From 8dec40553d4f17c20bd2f67912c20b23ddf9b5b1 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Fri, 21 Jun 2024 10:15:33 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=20terminal=20?= =?UTF-8?q?=E9=80=BB=E8=BE=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orion-visor-ui/src/store/modules/app/types.ts | 4 +- .../command-snippet-drawer.vue | 6 +- .../command-snippet-form-drawer.vue | 2 +- .../command-snippet-group-select.vue | 0 .../command-snippet-list-group.vue | 0 .../command-snippet-list-item.vue | 6 +- .../command-snippet/types/const.ts | 0 .../command-snippet/types/form.rules.ts | 0 .../components/layout/main-content.vue | 2 +- .../path-bookmark}/path-bookmark-drawer.vue | 15 ++-- .../path-bookmark-form-drawer.vue | 5 +- .../path-bookmark-group-select.vue | 0 .../path-bookmark-list-group.vue | 0 .../path-bookmark-list-item.vue | 6 +- .../components}/path-bookmark/types/const.ts | 6 -- .../path-bookmark/types/form.rules.ts | 0 .../components/sftp/sftp-chmod-modal.vue | 7 +- .../components/sftp/sftp-create-modal.vue | 7 +- .../components/sftp/sftp-move-modal.vue | 7 +- .../host/terminal/handler/base-session.ts | 46 ++++++++++ .../host/terminal/handler/sftp-session.ts | 29 ++----- .../host/terminal/handler/ssh-session.ts | 36 +++----- .../handler/terminal-output-processor.ts | 84 ++++++++++++------- .../handler/terminal-session-manager.ts | 24 ++---- .../src/views/host/terminal/index.vue | 8 +- .../host/terminal/types/terminal.const.ts | 4 + .../host/terminal/types/terminal.type.ts | 13 +-- 27 files changed, 177 insertions(+), 140 deletions(-) rename orion-visor-ui/src/views/host/{command-snippet/components => terminal/components/command-snippet}/command-snippet-drawer.vue (97%) rename orion-visor-ui/src/views/host/{command-snippet/components => terminal/components/command-snippet}/command-snippet-form-drawer.vue (98%) rename orion-visor-ui/src/views/host/{command-snippet/components => terminal/components/command-snippet}/command-snippet-group-select.vue (100%) rename orion-visor-ui/src/views/host/{command-snippet/components => terminal/components/command-snippet}/command-snippet-list-group.vue (100%) rename orion-visor-ui/src/views/host/{command-snippet/components => terminal/components/command-snippet}/command-snippet-list-item.vue (96%) rename orion-visor-ui/src/views/host/{ => terminal/components}/command-snippet/types/const.ts (100%) rename orion-visor-ui/src/views/host/{ => terminal/components}/command-snippet/types/form.rules.ts (100%) rename orion-visor-ui/src/views/host/{path-bookmark/components => terminal/components/path-bookmark}/path-bookmark-drawer.vue (95%) rename orion-visor-ui/src/views/host/{path-bookmark/components => terminal/components/path-bookmark}/path-bookmark-form-drawer.vue (96%) rename orion-visor-ui/src/views/host/{path-bookmark/components => terminal/components/path-bookmark}/path-bookmark-group-select.vue (100%) rename orion-visor-ui/src/views/host/{path-bookmark/components => terminal/components/path-bookmark}/path-bookmark-list-group.vue (100%) rename orion-visor-ui/src/views/host/{path-bookmark/components => terminal/components/path-bookmark}/path-bookmark-list-item.vue (97%) rename orion-visor-ui/src/views/host/{ => terminal/components}/path-bookmark/types/const.ts (57%) rename orion-visor-ui/src/views/host/{ => terminal/components}/path-bookmark/types/form.rules.ts (100%) create mode 100644 orion-visor-ui/src/views/host/terminal/handler/base-session.ts diff --git a/orion-visor-ui/src/store/modules/app/types.ts b/orion-visor-ui/src/store/modules/app/types.ts index f628b8cc..82ac0616 100644 --- a/orion-visor-ui/src/store/modules/app/types.ts +++ b/orion-visor-ui/src/store/modules/app/types.ts @@ -5,7 +5,7 @@ type ViewType = 'table' | 'card' | undefined; /** * 应用状态 */ -export interface AppState extends AppSetting, UserPreferenceLayout, UserPreferenceData, UserPreferenceViews { +export interface AppState extends AppSetting, UserPreferenceLayout, UserPreferenceData, UserPreferenceView { [key: string]: unknown; } @@ -43,7 +43,7 @@ export interface UserPreferenceData { /** * 用户偏好 - 页面视图 */ -export interface UserPreferenceViews { +export interface UserPreferenceView { hostView: ViewType; hostKeyView: ViewType; hostIdentityView: ViewType; diff --git a/orion-visor-ui/src/views/host/command-snippet/components/command-snippet-drawer.vue b/orion-visor-ui/src/views/host/terminal/components/command-snippet/command-snippet-drawer.vue similarity index 97% rename from orion-visor-ui/src/views/host/command-snippet/components/command-snippet-drawer.vue rename to orion-visor-ui/src/views/host/terminal/components/command-snippet/command-snippet-drawer.vue index 26dbba7c..798921ba 100644 --- a/orion-visor-ui/src/views/host/command-snippet/components/command-snippet-drawer.vue +++ b/orion-visor-ui/src/views/host/terminal/components/command-snippet/command-snippet-drawer.vue @@ -76,15 +76,15 @@