diff --git a/dbm-ui/frontend/src/services/model/doris/doris-detail.ts b/dbm-ui/frontend/src/services/model/doris/doris-detail.ts new file mode 100644 index 0000000000..39d6ea003a --- /dev/null +++ b/dbm-ui/frontend/src/services/model/doris/doris-detail.ts @@ -0,0 +1,25 @@ +/* + * TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. + * + * Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. + * + * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://opensource.org/licenses/MIT + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for + * the specific language governing permissions and limitations under the License. + */ + +import ClusterEntryDetailModel from '@services/model/cluster-entry/cluster-entry-details'; + +import DorisModel from './doris'; + +export default class DorisDetail extends DorisModel { + cluster_entry_details: ClusterEntryDetailModel[]; + + constructor(payload = {} as DorisDetail) { + super(payload); + this.cluster_entry_details = payload.cluster_entry_details.map((item) => new ClusterEntryDetailModel(item)); + } +} diff --git a/dbm-ui/frontend/src/services/model/doris/doris.ts b/dbm-ui/frontend/src/services/model/doris/doris.ts index 9527fb37db..90bc24a545 100644 --- a/dbm-ui/frontend/src/services/model/doris/doris.ts +++ b/dbm-ui/frontend/src/services/model/doris/doris.ts @@ -13,7 +13,7 @@ import { uniq } from 'lodash'; -import type { ClusterEntryDetail, ClusterListNode, ClusterListOperation } from '@services/types'; +import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; import { TicketTypes } from '@common/const'; @@ -60,7 +60,7 @@ export default class Doris { bk_cloud_name: string; cluster_access_port: number; cluster_alias: string; - cluster_entry_details: ClusterEntryDetail[]; + cluster_entry: ClusterListEntry[]; cluster_name: string; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; @@ -101,7 +101,7 @@ export default class Doris { this.bk_cloud_name = payload.bk_cloud_name; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; - this.cluster_entry_details = payload.cluster_entry_details; + this.cluster_entry = payload.cluster_entry; this.cluster_name = payload.cluster_name; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; diff --git a/dbm-ui/frontend/src/services/model/es/es.ts b/dbm-ui/frontend/src/services/model/es/es.ts index 79268db5d8..bcfbe0ed05 100644 --- a/dbm-ui/frontend/src/services/model/es/es.ts +++ b/dbm-ui/frontend/src/services/model/es/es.ts @@ -57,7 +57,7 @@ export default class Es { bk_cloud_name: string; cluster_access_port: number; cluster_alias: string; - cluster_entry: ClusterListEntry; + cluster_entry: ClusterListEntry[]; cluster_name: string; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; diff --git a/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts b/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts index 1352a61a0c..14fade02a5 100644 --- a/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts +++ b/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts @@ -57,7 +57,7 @@ export default class Hdfs { bk_cloud_name: string; cluster_access_port: number; cluster_alias: string; - cluster_entry: ClusterListEntry; + cluster_entry: ClusterListEntry[]; cluster_name: string; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; diff --git a/dbm-ui/frontend/src/services/model/kafka/kafka.ts b/dbm-ui/frontend/src/services/model/kafka/kafka.ts index 9d243639d9..b88e091e3c 100644 --- a/dbm-ui/frontend/src/services/model/kafka/kafka.ts +++ b/dbm-ui/frontend/src/services/model/kafka/kafka.ts @@ -58,7 +58,7 @@ export default class Kafka { broker: Array; cluster_access_port: number; cluster_alias: string; - cluster_entry: ClusterListEntry; + cluster_entry: ClusterListEntry[]; cluster_name: string; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; diff --git a/dbm-ui/frontend/src/services/source/doris.ts b/dbm-ui/frontend/src/services/source/doris.ts index 6ef89532bb..c64f58536e 100644 --- a/dbm-ui/frontend/src/services/source/doris.ts +++ b/dbm-ui/frontend/src/services/source/doris.ts @@ -12,6 +12,7 @@ */ import DorisModel from '@services/model/doris/doris'; +import DorisDetailModel from '@services/model/doris/doris-detail'; import DorisInstanceModel from '@services/model/doris/doris-instance'; import DorisMachineModel from '@services/model/doris/doris-machine'; import DorisNodeModel from '@services/model/doris/doris-node'; @@ -84,7 +85,7 @@ export function retrieveDorisInstance(params: { bk_biz_id: number }) { * 获取集群详情 */ export function getDorisDetail(params: { id: number }) { - return http.get(`${getRootPath()}/${params.id}/`).then((data) => new DorisModel(data)); + return http.get(`${getRootPath()}/${params.id}/`).then((data) => new DorisDetailModel(data)); } /** diff --git a/dbm-ui/frontend/src/views/db-manage/doris/list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/doris/list/components/detail/components/BaseInfo.vue index 60c1cef811..afe9419723 100644 --- a/dbm-ui/frontend/src/views/db-manage/doris/list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/doris/list/components/detail/components/BaseInfo.vue @@ -17,12 +17,12 @@