From 44dd5a9079da7a649f01c25a67a08673c9f9966e Mon Sep 17 00:00:00 2001 From: lijiahang Date: Thu, 29 Feb 2024 19:15:08 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0=20tab=20?= =?UTF-8?q?=E9=85=8D=E8=89=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orion-ops-ui/src/api/asset/host.ts | 8 +++++++- .../src/store/modules/terminal/index.ts | 1 + .../components/layout/terminal-panel.vue | 8 +++++--- .../host/terminal/types/terminal.type.ts | 20 +++++++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/orion-ops-ui/src/api/asset/host.ts b/orion-ops-ui/src/api/asset/host.ts index 45219e4c..736eba6a 100644 --- a/orion-ops-ui/src/api/asset/host.ts +++ b/orion-ops-ui/src/api/asset/host.ts @@ -36,7 +36,7 @@ export interface HostQueryRequest extends Pagination { /** * 主机查询响应 */ -export interface HostQueryResponse extends TableData { +export interface HostQueryResponse extends TableData, HostQueryResponseExtra { id: number; name: string; code: string; @@ -47,9 +47,15 @@ export interface HostQueryResponse extends TableData { updater: string; favorite: boolean; alias: string; + color: string; tags: Array<{ id: number, name: string }>; groupIdList: Array; +} +/** + * 主机操作拓展 + */ +export interface HostQueryResponseExtra { editable: boolean; loading: boolean; modCount: number; diff --git a/orion-ops-ui/src/store/modules/terminal/index.ts b/orion-ops-ui/src/store/modules/terminal/index.ts index 57bd15b8..d6221858 100644 --- a/orion-ops-ui/src/store/modules/terminal/index.ts +++ b/orion-ops-ui/src/store/modules/terminal/index.ts @@ -157,6 +157,7 @@ export default defineStore('terminal', { title: `(${nextSeq}) ${record.alias || record.name}`, hostId: record.id, address: record.address, + color: record.color, icon: session.icon, type: session.type }); diff --git a/orion-ops-ui/src/views/host/terminal/components/layout/terminal-panel.vue b/orion-ops-ui/src/views/host/terminal/components/layout/terminal-panel.vue index 6dc47f28..16251b51 100644 --- a/orion-ops-ui/src/views/host/terminal/components/layout/terminal-panel.vue +++ b/orion-ops-ui/src/views/host/terminal/components/layout/terminal-panel.vue @@ -21,7 +21,8 @@ :key="tab.key">