From 3851ead8bbd15114728df3930c24e22010c17609 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Fri, 26 Jul 2024 10:18:39 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20=E4=BF=AE=E6=94=B9=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1=E6=A0=B7=E5=BC=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/exec/log/panel-modal/index.vue | 5 -- .../components/exec/log/panel/exec-host.vue | 54 +++++++++++-------- .../src/store/modules/cache/index.ts | 10 +--- .../src/store/modules/cache/types.ts | 29 ++++------ .../src/store/modules/menu/index.ts | 2 +- .../components/exec-command-panel-history.vue | 24 +++++---- .../command-snippet-drawer.vue | 12 +++++ .../components/layout/empty-recommend.vue | 19 +++---- .../components/new-connection/hosts-view.vue | 6 --- .../path-bookmark/path-bookmark-drawer.vue | 12 +++++ .../host/terminal/components/ssh/ssh-view.vue | 2 +- .../src/views/host/terminal/types/const.ts | 3 ++ .../components/exec-job-form-drawer.vue | 2 +- 13 files changed, 91 insertions(+), 89 deletions(-) diff --git a/orion-visor-ui/src/components/exec/log/panel-modal/index.vue b/orion-visor-ui/src/components/exec/log/panel-modal/index.vue index 9d5e7f1c..7bb22859 100644 --- a/orion-visor-ui/src/components/exec/log/panel-modal/index.vue +++ b/orion-visor-ui/src/components/exec/log/panel-modal/index.vue @@ -119,11 +119,6 @@ align-items: center; } } - - .exec-host-items { - width: 100%; - height: calc(100% - 38px); - } } :deep(.log-header) { diff --git a/orion-visor-ui/src/components/exec/log/panel/exec-host.vue b/orion-visor-ui/src/components/exec/log/panel/exec-host.vue index 6289dd68..48877527 100644 --- a/orion-visor-ui/src/components/exec/log/panel/exec-host.vue +++ b/orion-visor-ui/src/components/exec/log/panel/exec-host.vue @@ -13,23 +13,26 @@
-
- -
- {{ item.hostName }} - {{ item.hostAddress }} + +
+ +
+ {{ item.hostName }} + {{ item.hostAddress }} +
+ +
+ + {{ getDictValue(execHostStatusKey, item.status) }} + +
- -
- - {{ getDictValue(execHostStatusKey, item.status) }} - -
-
+
@@ -78,13 +81,19 @@ } .exec-host-items { - position: absolute; - width: calc(100% - 32px); - height: calc(100% - 68px); - overflow: auto; + position: relative; + width: 100%; + height: calc(100% - 38px); - &::-webkit-scrollbar-track { - display: none; + :deep(.arco-scrollbar) { + position: absolute; + width: 100%; + height: 100%; + + &-container { + height: 100%; + overflow-y: auto; + } } } @@ -99,7 +108,6 @@ display: flex; justify-content: space-between; align-items: center; - margin-bottom: 8px; background: var(--color-fill-2); transition: all .2s; user-select: none; diff --git a/orion-visor-ui/src/store/modules/cache/index.ts b/orion-visor-ui/src/store/modules/cache/index.ts index 2c54ec0c..91a831ee 100644 --- a/orion-visor-ui/src/store/modules/cache/index.ts +++ b/orion-visor-ui/src/store/modules/cache/index.ts @@ -1,4 +1,4 @@ -import type { CacheState } from './types'; +import type { CacheState, CacheType } from './types'; import type { AxiosResponse } from 'axios'; import type { TagType } from '@/api/meta/tag'; import { getTagList } from '@/api/meta/tag'; @@ -19,14 +19,6 @@ import { getCommandSnippetGroupList } from '@/api/asset/command-snippet-group'; import { getExecJobList } from '@/api/job/exec-job'; import { getPathBookmarkGroupList } from '@/api/asset/path-bookmark-group'; -export type CacheType = 'users' | 'menus' | 'roles' - | 'hostGroups' | 'hostKeys' | 'hostIdentities' - | 'dictKeys' - | 'authorizedHostKeys' | 'authorizedHostIdentities' - | 'commandSnippetGroups' | 'pathBookmarkGroups' - | 'execJob' - | string - export default defineStore('cache', { state: (): CacheState => ({}), diff --git a/orion-visor-ui/src/store/modules/cache/types.ts b/orion-visor-ui/src/store/modules/cache/types.ts index 41fda8f5..6414981c 100644 --- a/orion-visor-ui/src/store/modules/cache/types.ts +++ b/orion-visor-ui/src/store/modules/cache/types.ts @@ -1,23 +1,12 @@ -import type { UserQueryResponse } from '@/api/user/user'; -import type { MenuQueryResponse } from '@/api/system/menu'; -import type { RoleQueryResponse } from '@/api/user/role'; -import type { HostQueryResponse } from '@/api/asset/host'; -import type { HostGroupQueryResponse } from '@/api/asset/host-group'; -import type { HostKeyQueryResponse } from '@/api/asset/host-key'; -import type { HostIdentityQueryResponse } from '@/api/asset/host-identity'; -import type { DictKeyQueryResponse } from '@/api/system/dict-key'; +// 缓存类型 +export type CacheType = 'users' | 'menus' | 'roles' + | 'hostGroups' | 'hostKeys' | 'hostIdentities' + | 'dictKeys' + | 'authorizedHostKeys' | 'authorizedHostIdentities' + | 'commandSnippetGroups' | 'pathBookmarkGroups' + | 'execJob' + | string export interface CacheState { - users?: UserQueryResponse[]; - menus?: MenuQueryResponse[]; - roles?: RoleQueryResponse[]; - hosts?: HostQueryResponse[]; - hostGroups?: HostGroupQueryResponse[]; - hostKeys?: HostKeyQueryResponse[]; - hostIdentities?: HostIdentityQueryResponse[]; - dictKeys?: DictKeyQueryResponse[]; - authorizedHostKeys?: HostKeyQueryResponse[]; - authorizedHostIdentities?: HostIdentityQueryResponse[]; - - [key: string]: unknown; + [key: CacheType]: unknown; } diff --git a/orion-visor-ui/src/store/modules/menu/index.ts b/orion-visor-ui/src/store/modules/menu/index.ts index 7a69ba9e..7ef85ba3 100644 --- a/orion-visor-ui/src/store/modules/menu/index.ts +++ b/orion-visor-ui/src/store/modules/menu/index.ts @@ -1,10 +1,10 @@ import type { RouteMeta, RouteRecordNormalized } from 'vue-router'; import type { MenuState } from './types'; import type { MenuQueryResponse } from '@/api/system/menu'; +import router from '@/router'; import { defineStore } from 'pinia'; import { Notification } from '@arco-design/web-vue'; import { getMenuList } from '@/api/user/auth'; -import router from '@/router'; import { EnabledStatus } from '@/types/const'; export default defineStore('menu', { diff --git a/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue b/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue index 6a0bec60..7a6762e0 100644 --- a/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue +++ b/orion-visor-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue @@ -18,9 +18,10 @@ -
-
+
@@ -32,7 +33,7 @@ {{ record.description }}
-
+
@@ -110,14 +111,16 @@ diff --git a/orion-visor-ui/src/views/host/terminal/components/path-bookmark/path-bookmark-drawer.vue b/orion-visor-ui/src/views/host/terminal/components/path-bookmark/path-bookmark-drawer.vue index 04ab7e94..f917e048 100644 --- a/orion-visor-ui/src/views/host/terminal/components/path-bookmark/path-bookmark-drawer.vue +++ b/orion-visor-ui/src/views/host/terminal/components/path-bookmark/path-bookmark-drawer.vue @@ -320,6 +320,18 @@ height: calc(100% - 56px); overflow: auto; padding-bottom: 4px; + + &::-webkit-scrollbar-track { + display: none; + } + + &::-webkit-scrollbar-thumb { + background: transparent; + } + + &:hover::-webkit-scrollbar-thumb { + background: var(--color-fill-4); + } } .loading-skeleton { diff --git a/orion-visor-ui/src/views/host/terminal/components/ssh/ssh-view.vue b/orion-visor-ui/src/views/host/terminal/components/ssh/ssh-view.vue index 1c073d71..f5af3cea 100644 --- a/orion-visor-ui/src/views/host/terminal/components/ssh/ssh-view.vue +++ b/orion-visor-ui/src/views/host/terminal/components/ssh/ssh-view.vue @@ -242,7 +242,7 @@ width: 100%; height: calc(100% - @ssh-header-height); position: relative; - padding: 6px 0 0 6px; + padding: 8px; .ssh-inst { width: 100%; diff --git a/orion-visor-ui/src/views/host/terminal/types/const.ts b/orion-visor-ui/src/views/host/terminal/types/const.ts index efbc7d06..66e467fb 100644 --- a/orion-visor-ui/src/views/host/terminal/types/const.ts +++ b/orion-visor-ui/src/views/host/terminal/types/const.ts @@ -1,5 +1,8 @@ import type { ShortcutKeyItem } from './define'; +// 首页推荐数量 +export const emptyRecommendCount = 7; + // 终端 tab export const TerminalTabs = { NEW_CONNECTION: { diff --git a/orion-visor-ui/src/views/job/exec-job/components/exec-job-form-drawer.vue b/orion-visor-ui/src/views/job/exec-job/components/exec-job-form-drawer.vue index 0106658c..68a6d121 100644 --- a/orion-visor-ui/src/views/job/exec-job/components/exec-job-form-drawer.vue +++ b/orion-visor-ui/src/views/job/exec-job/components/exec-job-form-drawer.vue @@ -421,7 +421,7 @@ .command-editor { width: 100%; - height: calc(100vh - 318px); + height: calc(100vh - 324px); } :deep(.arco-input-append) {