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">