From 3cb31d03a35de130fb8b03c658853e692f9b451c Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Tue, 11 Jun 2024 09:53:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=96=B0=E5=A2=9Edoris?= =?UTF-8?q?=E9=9B=86=E7=BE=A4=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=20#3391?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/src/common/const.ts | 19 + .../bigdata-instance-detail/Index.vue | 435 +++++++ .../cluster-common/RenderOperationTagNew.vue | 17 + .../doris-observer-host-expansion/Index.vue | 111 ++ .../components/HostSelector.vue | 187 +++ .../components/ResourcePoolSelector.vue | 204 ++++ .../doris-observer-host-shrink/Index.vue | 336 ++++++ .../es-host-expansion/Index.vue | 22 +- .../cluster-common/host-expansion/Index.vue | 22 +- .../host-expansion/NodeStatusList.vue | 29 +- .../cluster-common/host-replace/Index.vue | 5 +- .../host-replace/components/HostSelector.vue | 5 +- .../components/ResourcePoolSelector.vue | 5 +- .../cluster-common/host-shrink/Index.vue | 50 +- .../host-shrink/NodeStatusList.vue | 22 +- .../components/SelectOriginalHost.vue | 12 +- .../cluster-details/ClusterTopo.vue | 2 + .../cluster-details/common/useRenderGraph.tsx | 3 + .../components/mongo/Index.vue | 10 +- .../components/sqlserver/Index.vue | 12 +- .../components/redis/Index.vue | 10 +- .../components/tendb-cluster/Index.vue | 10 +- .../components/tendb-single/Index.vue | 10 +- .../components/tendbha/Index.vue | 10 +- .../src/components/cluster-tab/Index.vue | 5 + .../frontend/src/components/db-tab/Index.vue | 5 + .../dropdown-export-excel/index.vue | 10 +- .../ip-selector-submit-tips/Index.vue | 31 + .../system-search/hooks/useRedirect.ts | 1 + dbm-ui/frontend/src/layout/Index.vue | 1 + .../components/ModuleConfig.vue | 5 + .../components/module-group/Doris.vue | 24 + .../components/module-group/Index.vue | 2 + dbm-ui/frontend/src/locales/zh-cn.json | 46 +- dbm-ui/frontend/src/router/index.ts | 2 + .../services/model/doris/doris-instance.ts | 120 ++ .../src/services/model/doris/doris-node.ts | 108 ++ .../services/model/doris/doris-password.ts | 26 + .../src/services/model/doris/doris.ts | 263 ++++ .../src/services/model/es/es-instance.ts | 2 +- dbm-ui/frontend/src/services/model/es/es.ts | 14 +- .../function-controller/functionController.ts | 2 +- .../src/services/model/hdfs/hdfs-instance.ts | 2 +- .../frontend/src/services/model/hdfs/hdfs.ts | 14 +- .../model/influxdb/influxdbInstance.ts | 6 +- .../services/model/kafka/kafka-instance.ts | 2 +- .../src/services/model/kafka/kafka.ts | 14 +- .../services/model/mongodb/mongodb-detail.ts | 157 ++- .../model/mongodb/mongodb-instance.ts | 16 +- .../src/services/model/mongodb/mongodb.ts | 6 +- .../src/services/model/mysql/tendbha.ts | 12 +- .../src/services/model/mysql/tendbsingle.ts | 12 +- .../services/model/pulsar/pulsar-instance.ts | 2 +- .../src/services/model/pulsar/pulsar.ts | 14 +- .../src/services/model/redis/redis.ts | 12 +- .../src/services/model/riak/riak-node.ts | 4 +- .../frontend/src/services/model/riak/riak.ts | 12 +- .../src/services/model/spider/tendbCluster.ts | 10 +- .../model/sqlserver/sqlserver-ha-cluster.ts | 10 +- .../model/sqlserver/sqlserver-ha-instance.ts | 22 + .../sqlserver/sqlserver-single-cluster.ts | 8 +- dbm-ui/frontend/src/services/source/doris.ts | 143 +++ .../list/components/hooks/useTreeData.ts | 1 + .../src/views/db-configure/common/const.ts | 9 +- .../frontend/src/views/doris-manage/Index.vue | 16 + .../src/views/doris-manage/apply/Index.vue | 862 ++++++++++++++ .../doris-manage/common/expansion/Index.vue | 473 ++++++++ .../doris-manage/common/replace/Index.vue | 444 +++++++ .../doris-manage/common/shrink/Index.vue | 433 +++++++ .../src/views/doris-manage/list/Index.vue | 38 + .../list/components/detail/Index.vue | 162 +++ .../components/detail/components/BaseInfo.vue | 35 + .../detail/components/node-list/Index.vue | 725 ++++++++++++ .../list/components/list/Index.vue | 1054 +++++++++++++++++ .../frontend/src/views/doris-manage/routes.ts | 47 + .../es-manage/common/expansion/Index.vue | 3 + .../views/es-manage/common/shrink/Index.vue | 3 + .../detail/components/node-list/Index.vue | 6 +- .../node-list/components/InstanceDetail.vue | 2 +- .../es-manage/list/components/list/Index.vue | 16 +- .../hdfs-manage/common/expansion/Index.vue | 1 + .../views/hdfs-manage/common/shrink/Index.vue | 1 + .../detail/components/node-list/Index.vue | 7 +- .../node-list/components/InstanceDetail.vue | 2 +- .../list/components/list/Index.vue | 16 +- .../components/render-list/Index.vue | 17 +- .../kafka-manage/common/expansion/Index.vue | 1 + .../kafka-manage/common/shrink/Index.vue | 1 + .../detail/components/node-list/Index.vue | 8 +- .../node-list/components/InstanceDetail.vue | 2 +- .../list/components/list/Index.vue | 55 +- .../mongodb-instance/list/index.vue | 13 +- .../components/list/Index.vue | 13 +- .../components/list/Index.vue | 13 +- .../mysql/ha-cluster-list/components/List.vue | 12 +- .../views/mysql/partition-manage/Index.vue | 10 +- .../single-cluster-list/components/List.vue | 12 +- .../pulsar-manage/common/expansion/Index.vue | 2 + .../pulsar-manage/common/shrink/Index.vue | 2 + .../detail/components/node-list/Index.vue | 13 +- .../node-list/components/InstanceDetail.vue | 2 +- .../list/components/list/Index.vue | 16 +- .../redis/list-ha/components/list/Index.vue | 6 +- .../redis/list/components/list/Index.vue | 8 +- .../src/views/resource-manage/spec/Index.vue | 19 + .../spec/components/SpecList.vue | 4 +- .../list/components/list/Index.vue | 11 +- .../src/views/service-apply/index/Index.vue | 7 + .../src/views/service-apply/routes.ts | 8 + .../list/components/list/Index.vue | 14 +- .../spider-manage/partition-manage/Index.vue | 10 +- .../ha-cluster-list/components/List.vue | 2 +- .../single-cluster/components/List.vue | 6 +- .../components/demand-factory/Index.vue | 9 + .../demand-factory/bigdata/DetailsDoris.vue | 301 +++++ .../bigdata/expansion-capacity/Index.vue | 2 + .../components/demand-factory/common/types.ts | 30 +- .../src/views/version-files/list/Index.vue | 21 +- .../list/components/FileContent.vue | 2 +- 119 files changed, 7336 insertions(+), 365 deletions(-) create mode 100644 dbm-ui/frontend/src/components/bigdata-instance-detail/Index.vue create mode 100644 dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/Index.vue create mode 100644 dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/HostSelector.vue create mode 100644 dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/ResourcePoolSelector.vue create mode 100644 dbm-ui/frontend/src/components/cluster-common/doris-observer-host-shrink/Index.vue create mode 100644 dbm-ui/frontend/src/components/ip-selector-submit-tips/Index.vue create mode 100644 dbm-ui/frontend/src/layout/components/database-manage/components/module-group/Doris.vue create mode 100644 dbm-ui/frontend/src/services/model/doris/doris-instance.ts create mode 100644 dbm-ui/frontend/src/services/model/doris/doris-node.ts create mode 100644 dbm-ui/frontend/src/services/model/doris/doris-password.ts create mode 100644 dbm-ui/frontend/src/services/model/doris/doris.ts create mode 100644 dbm-ui/frontend/src/services/source/doris.ts create mode 100644 dbm-ui/frontend/src/views/doris-manage/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/apply/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/common/expansion/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/common/replace/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/common/shrink/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/list/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/list/components/detail/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/list/components/detail/components/BaseInfo.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/list/components/detail/components/node-list/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/list/components/list/Index.vue create mode 100644 dbm-ui/frontend/src/views/doris-manage/routes.ts create mode 100644 dbm-ui/frontend/src/views/tickets/common/components/demand-factory/bigdata/DetailsDoris.vue diff --git a/dbm-ui/frontend/src/common/const.ts b/dbm-ui/frontend/src/common/const.ts index 2782e3474..5d5a07b86 100644 --- a/dbm-ui/frontend/src/common/const.ts +++ b/dbm-ui/frontend/src/common/const.ts @@ -28,6 +28,7 @@ export enum DBTypes { INFLUXDB = 'influxdb', SPIDER = 'spider', RIAK = 'riak', + DORIS = 'doris', } export type DBTypesValues = `${DBTypes}`; @@ -61,6 +62,7 @@ export enum ClusterTypes { PULSAE = 'pulsar', INFLUXDB = 'influxdb', RIAK = 'riak', + DORIS = 'doris', } // 机器类型 @@ -149,6 +151,9 @@ export const clusterTypeInfos = { [ClusterTypes.SQLSERVER_SINGLE]: { dbType: DBTypes.SQLSERVER, }, + [ClusterTypes.DORIS]: { + dbType: DBTypes.DORIS, + }, }; export type ClusterTypeInfos = keyof typeof clusterTypeInfos; @@ -336,6 +341,14 @@ export enum TicketTypes { REDIS_INSTANCE_PROXY_OPEN = 'REDIS_INSTANCE_PROXY_OPEN', // redis 主从集群启用 REDIS_INSTANCE_PROXY_CLOSE = 'REDIS_INSTANCE_PROXY_CLOSE', // redis 主从集群禁用 REDIS_INSTANCE_DESTROY = 'REDIS_INSTANCE_DESTROY', // redis 主从集群删除 + DORIS_APPLY = 'DORIS_APPLY', // doris 部署 + DORIS_ENABLE = 'DORIS_ENABLE', // doris 启用 + DORIS_DISABLE = 'DORIS_DISABLE', // doris 禁用 + DORIS_DESTROY = 'DORIS_DESTROY', // doris 删除 + DORIS_REBOOT = 'DORIS_REBOOT', // doris 重启 + DORIS_REPLACE = 'DORIS_REPLACE', // doris 替换 + DORIS_SCALE_UP = 'DORIS_SCALE_UP', // doris 扩容 + DORIS_SHRINK = 'DORIS_SHRINK', // doris 缩容 MYSQL_DUMP_DATA = 'MYSQL_DUMP_DATA', // 数据导出 } export type TicketTypesStrings = keyof typeof TicketTypes; @@ -434,6 +447,11 @@ export const bigDataType = { name: t('Riak集群部署'), type: ClusterTypes.RIAK, }, + [TicketTypes.DORIS_APPLY]: { + id: TicketTypes.DORIS_APPLY, + name: t('Doris集群部署'), + type: ClusterTypes.DORIS, + }, }; export const mongoType = { @@ -534,6 +552,7 @@ export enum UserPersonalSettings { REDIS_HA_INSTANCE_SETTINGS = 'REDIS_HA_INSTANCE_SETTINGS', SQLSERVER_TOOLBOX_MENUS = 'SQLSERVER_TOOLBOX_MENUS', SQLSERVER_TOOLBOX_FAVOR = 'SQLSERVER_TOOLBOX_FAVOR', + DORIS_TABLE_SETTINGS = 'DORIS_TABLE_SETTINGS', } /** diff --git a/dbm-ui/frontend/src/components/bigdata-instance-detail/Index.vue b/dbm-ui/frontend/src/components/bigdata-instance-detail/Index.vue new file mode 100644 index 000000000..6d2038c4d --- /dev/null +++ b/dbm-ui/frontend/src/components/bigdata-instance-detail/Index.vue @@ -0,0 +1,435 @@ + + + + + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/RenderOperationTagNew.vue b/dbm-ui/frontend/src/components/cluster-common/RenderOperationTagNew.vue index 3561c7c08..7c8a144b9 100644 --- a/dbm-ui/frontend/src/components/cluster-common/RenderOperationTagNew.vue +++ b/dbm-ui/frontend/src/components/cluster-common/RenderOperationTagNew.vue @@ -81,6 +81,22 @@ color: '#FE9C00', background: '#FFF1DB', }, + [t('替换中')]: { + color: '#29AAE8', + background: '#EDFBFF', + }, + [t('扩容中')]: { + color: '#14A568', + background: '#E4FAF0', + }, + [t('重启中')]: { + color: '#3A84FF', + background: '#EDF4FF', + }, + [t('缩容中')]: { + color: '#8E3AFF', + background: '#F2EDFF', + }, }; const rootRef = ref(); @@ -146,6 +162,7 @@ padding: 0 4px; line-height: 16px; cursor: pointer; + border-radius: 2px; .icon-text { display: inline-block; diff --git a/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/Index.vue b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/Index.vue new file mode 100644 index 000000000..9c0d38849 --- /dev/null +++ b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/Index.vue @@ -0,0 +1,111 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/HostSelector.vue b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/HostSelector.vue new file mode 100644 index 000000000..7631d6afe --- /dev/null +++ b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/HostSelector.vue @@ -0,0 +1,187 @@ + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/ResourcePoolSelector.vue b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/ResourcePoolSelector.vue new file mode 100644 index 000000000..41da7cf42 --- /dev/null +++ b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-expansion/components/ResourcePoolSelector.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-shrink/Index.vue b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-shrink/Index.vue new file mode 100644 index 000000000..d0fca86d9 --- /dev/null +++ b/dbm-ui/frontend/src/components/cluster-common/doris-observer-host-shrink/Index.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/es-host-expansion/Index.vue b/dbm-ui/frontend/src/components/cluster-common/es-host-expansion/Index.vue index 39293a617..4b106898c 100644 --- a/dbm-ui/frontend/src/components/cluster-common/es-host-expansion/Index.vue +++ b/dbm-ui/frontend/src/components/cluster-common/es-host-expansion/Index.vue @@ -13,8 +13,13 @@