From 2aad7a87ccd9bbfcf6ad7e79a7b975815607ad8e Mon Sep 17 00:00:00 2001 From: jojo Date: Tue, 8 Oct 2024 15:03:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=B7=BB=E5=8A=A0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=8A=E4=B8=9A=E5=8A=A1=E4=B8=8B=E7=9A=84=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=A0=87=E7=AD=BE=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20#7285=20#=20Reviewed,=20transaction=20id:=2022801?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/lib/bk-icon/demo.html | 30 + .../frontend/lib/bk-icon/fonts/iconcool.eot | Bin 53216 -> 53216 bytes .../frontend/lib/bk-icon/fonts/iconcool.ttf | Bin 53048 -> 53048 bytes .../frontend/lib/bk-icon/fonts/iconcool.woff | Bin 31676 -> 31676 bytes .../components/disk-pop-info/DiskPopInfo.vue | 7 +- dbm-ui/frontend/src/layout/Index.vue | 2 + .../src/layout/components/ConfigManage.vue | 32 +- .../src/layout/components/ResourceManage.vue | 12 + dbm-ui/frontend/src/locales/zh-cn.json | 430 ++++++------- dbm-ui/frontend/src/router/index.ts | 2 + .../services/model/db-resource/DbResource.ts | 9 +- .../services/model/db-resource/ResourceTag.ts | 45 ++ .../function-controller/functionController.ts | 3 + .../src/services/source/dbresourceResource.ts | 4 +- dbm-ui/frontend/src/services/source/tag.ts | 75 +++ dbm-ui/frontend/src/stores/globalBizs.ts | 5 + .../resource-manage/pool/business/Index.vue | 89 +++ .../pool/components/host-list/Index.vue | 579 ++++++++++++++++++ .../host-list/components/HostOperationTip.vue | 114 ++++ .../host-list/components/ImportHostBtn.vue | 0 .../host-list/components/RenderTable.vue | 2 + .../components/batch-assign/Index.vue | 148 +++++ .../batch-assign/components/FormPanel.vue | 176 ++++++ .../batch-assign/components/ListPanel.vue | 266 ++++++++ .../batch-convert-to-business/Index.vue | 78 +++ .../batch-covert-to-public/Index.vue | 77 +++ .../batch-move-to-fault-pool/Index.vue | 64 ++ .../batch-move-to-recycle-pool/Index.vue | 64 ++ .../components/batch-setting/Index.vue | 44 +- .../components/ResourceSpecStorage.vue | 0 .../components/batch-undo-import/Index.vue | 64 ++ .../components/import-host/Index.vue | 31 +- .../import-host/components/FormPanel.vue | 105 ++-- .../components/select-host-panel/Index.vue | 4 +- .../components/HostEmpty.vue | 0 .../resource-search-selector/Index.vue | 132 ++++ .../components/review-data-dialog/Index.vue | 158 +++++ .../host-list/components/search-box/Index.vue | 0 .../components/com-factory/Index.vue | 2 + .../com-factory/components/AgentStatus.vue | 0 .../com-factory/components/BkCloudIds.vue | 0 .../com-factory/components/CitySubzones.vue | 0 .../components/com-factory/components/Cpu.vue | 0 .../com-factory/components/DeviceClass.vue | 0 .../com-factory/components/Disk.vue | 0 .../com-factory/components/DiskType.vue | 0 .../com-factory/components/ForBiz.vue | 0 .../com-factory/components/Hosts.vue | 0 .../com-factory/components/Label.vue | 84 +++ .../components/com-factory/components/Mem.vue | 0 .../com-factory/components/MountPoint.vue | 0 .../com-factory/components/OSType.vue | 0 .../com-factory/components/ResourceType.vue | 0 .../com-factory/components/SpecId.vue | 0 .../search-box/components/field-config.ts | 5 + .../components/field-input/Index.vue | 8 +- .../components/CollectSearchParams.vue | 0 .../search-box/components/field-tag/Index.vue | 0 .../components/field-tag/ValueTag.vue | 0 .../components/search-box/components/utils.ts | 0 .../components/tag-research/panel/Index.vue | 47 ++ .../tag-research/selector/Index.vue | 92 +++ .../components/tag-selector/Index.vue | 272 ++++++++ .../components/update-assign/Index.vue | 167 +++++ .../host-list/hooks/useTableSetting.ts | 0 .../{ => components}/summary-view/Index.vue | 0 .../summary-view/components/BarChart.vue | 0 .../components/DimensionSelect.vue | 0 .../summary-view/components/Export.vue | 0 .../summary-view/components/List.vue | 0 .../components/search-box/Index.vue | 0 .../components/search-box/components/Biz.vue | 0 .../components/search-box/components/Db.vue | 0 .../search-box/components/Region.vue | 0 .../components/search-box/components/Spec.vue | 0 .../pool/{ => global}/Index.vue | 44 +- .../resource-manage/pool/host-list/Index.vue | 343 ----------- .../src/views/resource-manage/pool/type.ts | 13 + .../src/views/resource-manage/routes.ts | 15 +- .../frontend/src/views/tag-manage/Index.vue | 440 +++++++++++++ .../components/BusinessSelector.vue | 160 +++++ .../views/tag-manage/components/CreateTag.vue | 178 ++++++ .../tag-manage/components/EditableCell.vue | 99 +++ .../frontend/src/views/tag-manage/routes.ts | 41 ++ 84 files changed, 4200 insertions(+), 661 deletions(-) create mode 100644 dbm-ui/frontend/src/services/model/db-resource/ResourceTag.ts create mode 100644 dbm-ui/frontend/src/services/source/tag.ts create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/business/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/HostOperationTip.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/ImportHostBtn.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/RenderTable.vue (99%) create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/FormPanel.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/ListPanel.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-convert-to-business/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-covert-to-public/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-fault-pool/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-recycle-pool/Index.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/batch-setting/Index.vue (86%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/batch-setting/components/ResourceSpecStorage.vue (100%) create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-undo-import/Index.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/import-host/Index.vue (81%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/import-host/components/FormPanel.vue (82%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/import-host/components/select-host-panel/Index.vue (97%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/import-host/components/select-host-panel/components/HostEmpty.vue (100%) create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/resource-search-selector/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/review-data-dialog/Index.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/Index.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/Index.vue (98%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/AgentStatus.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/BkCloudIds.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/CitySubzones.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/Cpu.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/DeviceClass.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/Disk.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/DiskType.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/ForBiz.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/Hosts.vue (100%) create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Label.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/Mem.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/MountPoint.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/OSType.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/ResourceType.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/com-factory/components/SpecId.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/field-config.ts (98%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/field-input/Index.vue (96%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/field-input/components/CollectSearchParams.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/field-tag/Index.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/field-tag/ValueTag.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/components/search-box/components/utils.ts (100%) create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/panel/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/selector/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-selector/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/update-assign/Index.vue rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/host-list/hooks/useTableSetting.ts (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/Index.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/BarChart.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/DimensionSelect.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/Export.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/List.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/search-box/Index.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/search-box/components/Biz.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/search-box/components/Db.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/search-box/components/Region.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => components}/summary-view/components/search-box/components/Spec.vue (100%) rename dbm-ui/frontend/src/views/resource-manage/pool/{ => global}/Index.vue (73%) delete mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue create mode 100644 dbm-ui/frontend/src/views/resource-manage/pool/type.ts create mode 100644 dbm-ui/frontend/src/views/tag-manage/Index.vue create mode 100644 dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue create mode 100644 dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue create mode 100644 dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue create mode 100644 dbm-ui/frontend/src/views/tag-manage/routes.ts diff --git a/dbm-ui/frontend/lib/bk-icon/demo.html b/dbm-ui/frontend/lib/bk-icon/demo.html index b0a9502cfa..3482f60773 100644 --- a/dbm-ui/frontend/lib/bk-icon/demo.html +++ b/dbm-ui/frontend/lib/bk-icon/demo.html @@ -117,6 +117,10 @@

    +
  • + +

    tags

    +
  • check-circle-fill

    @@ -749,6 +753,10 @@

    backup-2

  • +
  • + +

    loading-tubiao

    +
  • host-select

    @@ -829,6 +837,10 @@

    dirty-host

  • +
  • + +

    tag-3

    +
  • saoba

    @@ -990,6 +1002,12 @@

    如何使用

    +
  • + + + +

    tags

    +
  • @@ -1938,6 +1956,12 @@

    如何使用

    backup-2

  • +
  • + + + +

    loading-tubiao

    +
  • @@ -2058,6 +2082,12 @@

    如何使用

    dirty-host

  • +
  • + + + +

    tag-3

    +
  • diff --git a/dbm-ui/frontend/lib/bk-icon/fonts/iconcool.eot b/dbm-ui/frontend/lib/bk-icon/fonts/iconcool.eot index 3257d928f5c5a0ce72ac5c86d1bb6bbf709fdafb..d510257ec25fd5434caf055d54cbc3e16884addb 100644 GIT binary patch delta 58 zcmaDbpZURj<_R_|oQJQZPjuM9qOYphI`PjGne;1%Ipg_lzA|vLFo3{g*Z0yedh;4a GlXC!;q!k+g delta 58 zcmaDbpZURj<_R_|wYwZMCOYh3(R;V_^u#|?WHKCg)yDJNd}ZKfVE}>0S{vEHX|wrs!v@_e9C`o% diff --git a/dbm-ui/frontend/src/components/disk-pop-info/DiskPopInfo.vue b/dbm-ui/frontend/src/components/disk-pop-info/DiskPopInfo.vue index 74eb16d751..1e91969cc2 100644 --- a/dbm-ui/frontend/src/components/disk-pop-info/DiskPopInfo.vue +++ b/dbm-ui/frontend/src/components/disk-pop-info/DiskPopInfo.vue @@ -2,7 +2,7 @@ @@ -26,9 +26,12 @@ interface Props { data: DbResourceModel['storage_device']; + trigger?: 'hover' | 'click' | 'manual'; } - const props = defineProps(); + const props = withDefaults(defineProps(), { + trigger: 'hover', + }); const { t } = useI18n(); diff --git a/dbm-ui/frontend/src/layout/Index.vue b/dbm-ui/frontend/src/layout/Index.vue index 91d7137f91..cfe8ec81e5 100644 --- a/dbm-ui/frontend/src/layout/Index.vue +++ b/dbm-ui/frontend/src/layout/Index.vue @@ -138,6 +138,8 @@ ], [menuEnum.observableManage]: ['DBHASwitchEvents', 'inspectionManage'], [menuEnum.configManage]: [ + 'BizResourcePool', + 'BizResourceTag', 'DbConfigure', 'DBMonitorStrategy', 'DBMonitorAlarmGroup', diff --git a/dbm-ui/frontend/src/layout/components/ConfigManage.vue b/dbm-ui/frontend/src/layout/components/ConfigManage.vue index e6a675fdce..c4ba4938c5 100644 --- a/dbm-ui/frontend/src/layout/components/ConfigManage.vue +++ b/dbm-ui/frontend/src/layout/components/ConfigManage.vue @@ -9,6 +9,36 @@ :active-key="currentActiveKey" :opened-keys="[parentKey]" @click="handleMenuChange"> + + + + + {{ t('资源池') }} + + + + + + {{ t('资源标签') }} + + + >, 'DbConfigure'); + } = useActiveKey(menuRef as Ref>, 'BizResourcePool'); const styles = useMenuStyles(menuBoxRef); diff --git a/dbm-ui/frontend/src/layout/components/ResourceManage.vue b/dbm-ui/frontend/src/layout/components/ResourceManage.vue index d187047bf5..90efa287e7 100644 --- a/dbm-ui/frontend/src/layout/components/ResourceManage.vue +++ b/dbm-ui/frontend/src/layout/components/ResourceManage.vue @@ -41,6 +41,18 @@ {{ t('污点主机处理') }} + + + + {{ t('资源标签管理') }} + + diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index c3528790ac..50ab33313c 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -351,6 +351,7 @@ "访问DB": "访问 DB", "访问源预览": "访问源预览", "旧从库主机": "旧从库主机", + "新从库主机": "新从库主机", "备份源": "备份源", "目标从库实例": "目标从库实例", "请输入域名_集群名称_所属DB模块": "请输入域名,集群名称,所属DB模块", @@ -646,6 +647,7 @@ "全选": "全选", "权限设置": "权限设置", "请输入DB名称_可以使用通配符_如Data_区分大小写_多个使用英文逗号_分号或换行分隔": "请输入 DB 名称,可以使用通配符 %,如 Data%,区分大小写,多个使用英文逗号、分号或换行分隔", + "DB名称不支持 *": "DB名称不支持 *", "该账号下已存在xx规则": "该账号下已存在 {0} 规则", "收藏成功": "收藏成功", "取消收藏成功": "取消收藏成功", @@ -1044,11 +1046,10 @@ "清除表数据和结构_droptable": "清除表数据和结构(drop table)", "清除表数据_truncatetable": "清除表数据(truncate table)", "特殊符号序": "特殊符号序", - "包含特殊字符_除空格外": "包含特殊字符,除空格外", "包含数字": "包含数字", "包含大写字母": "包含大写字母", "包含小写字母": "包含小写字母", - "MySQL_授权规则": "【MySQL】授权规则", + "指定特殊字符(s)": "指定特殊字符({s})", "MySQL主从集群_实例详情": "【MySQL 主从集群】实例详情", "MySQL主从集群_实例视图": "【MySQL 主从集群】实例视图", "MySQL主从集群详情": "MySQL 主从集群详情", @@ -1202,6 +1203,7 @@ "Bookkeeper节点数至少为2台": "Bookkeeper 节点数至少为 2 台", "Zookeeper节点数需3台": "Zookeeper 节点数需 3 台", "Broker节点数至少为1台": "Broker节点数至少为 1 台", + "已选n台_共nGB(目标容量:nG)": "已选{0}台,共{1}GB(目标容量:{2}G)", "(共n台_磁盘容量nG)": "(共{0}台,磁盘容量{1}G)", "(需n台_已选n台_少n台_共nG)": "(需{0}台,已选{1}台,少{2}台_共{3}G)", "确认扩容【name】集群": "确认扩容【{name}】集群?", @@ -1433,6 +1435,7 @@ "请先返回列表选择要替换的节点 IP": "请先返回列表选择要替换的节点 IP", "xx节点规格": "{name}节点规格", "替换后原节点 IP 将不在可用,资源将会被释放": "替换后原节点 IP 将不在可用,资源将会被释放", + "已选n台_共nG_(目标容量:nG)": "已选{0}台,共{1}G(目标容量:{1}G)", "Client 节点": "Client 节点", "冷热节点至少扩容一种类型": "冷热节点至少扩容一种类型", "每台主机实例数量": "每台主机实例数量", @@ -1637,7 +1640,7 @@ "断开后,数据将不会再再自动同步,请谨慎操作!": "断开后,数据将不会再再自动同步,请谨慎操作!", "重新复制": "重新复制", "确认重新复制数据?": "确认重新复制数据?", - "全量覆盖同名 Key(如:del $key+ hset $key)": "全量覆盖同名 Key(如:del $key+ hset $key)", + "全量覆盖同名 Key(如:del $key+ hset $key)": "全量覆盖同名 Key(如:del $key+ hset $key)", "增量覆盖同名 Key(如:hset $key)": "增量覆盖同名 Key(如:hset $key)", "清空目标集群所有数据": "清空目标集群所有数据", "请输入集群名称": "请输入集群名称", @@ -1681,7 +1684,7 @@ "复制完成后,只进行一次": "复制完成后,只进行一次", "复制完成后,每三天一次": "复制完成后,每三天一次", "复制完成后,每周一次": "复制完成后,每周一次", - "先删除同名 Key,再写入(如:del $key+ hset $key)": "先删除同名 Key,再写入(如:del $key+ hset $key)", + "先删除同名 Key,再写入(如:del $key+ hset $key)": "先删除同名 Key,再写入(如:del $key+ hset $key)", "保留同名 Key,追加写入(如:hset $key)": "保留同名 Key,追加写入(如:hset $key)", "清空目标集群所有数据,再写入": "清空目标集群所有数据,再写入", "业务内": "业务内", @@ -1955,13 +1958,12 @@ "请输入 DB 名、表名": "请输入 DB 名、表名", "目标 DB 不能为空": "目标 DB 不能为空", "请输入完整信息验证分区字段": "请输入完整信息验证分区字段", - "分区字段验证失败": "分区字段验证失败", "目标 DB": "目标 DB", "字段类型": "字段类型", "分区间隔": "分区间隔", "数据过期时间": "数据过期时间", "天": "天", - "暂无主机,你通过以下方法获取主机至“DBA 业务 -> 空闲机池 -> 空闲机模块”": "暂无主机,你通过以下方法获取主机至“DBA 业务 -> 空闲机池 -> 空闲机模块”", + "暂无主机,你通过以下方法获取主机至“DBA 业务 -> 空闲机池 -> 空闲机模块”": "暂无主机,你通过以下方法获取主机至“DBA 业务 -> 空闲机池 -> 空闲机模块”", "CMDB 资源池": "CMDB 资源池", "方法一:从CMDB 资源池分配;": "方法一:从CMDB 资源池分配;", "节点管理导入": "节点管理导入", @@ -1976,7 +1978,7 @@ "扩容规格": "扩容规格", "选择 Master IP 会默认选上关联的 Slave IP,一同替换": "选择 Master IP 会默认选上关联的 Slave IP,一同替换", "不再提示": "不再提示", - "扩容接入层:增加集群的Proxy数量,新Proxy可以指定规格": "扩容接入层:增加集群的 Proxy 数量,新 Proxy可以指定规格", + "扩容接入层:增加集群的Proxy数量,新Proxy可以指定规格": "扩容接入层:增加集群的 Proxy 数量,新 Proxy可以指定规格", "选择集群类型变更部署方案": "选择集群类型变更部署方案", "数据复制记录:数据复制记录提供数据复制后相关操作": "数据复制记录:数据复制记录提供数据复制后相关操作", "暂无从库故障集群": "暂无从库故障集群", @@ -2427,6 +2429,7 @@ "已选实例": "已选实例", "新建订阅规则": "新建订阅规则", "确认批量删除n个实例?": "确认批量删除 {n} 个实例?", + "确认批量删除n个标签?": "确认批量删除 {n} 个标签?", "确认批量禁用n个实例?": "确认批量禁用 {n} 个实例?", "部署dumper实例ID": "部署 dumper 实例 ID", "接收端集群与端口": "接收端集群与端口", @@ -2565,8 +2568,7 @@ "数据校验修复任务进行中": "数据校验修复任务进行中", "复制域名": "复制域名", "克隆分区策略": "克隆分区策略", - "注意_对从库授权时仅会授予select权限": "注意:对从库授权时仅会授予 select 权限", - "mongDB实例视图": "【MongDB】实例视图", + "注意_对从域名授权时仅会授予 select 权限": "注意:对从域名授权时仅会授予 select 权限", "实例:name": "实例:{name}", "从域名": "从域名", "请输入关键字或选择条件搜索": "请输入关键字或选择条件搜索", @@ -2591,9 +2593,6 @@ "申请MongoDB副本集部署": "申请 MongoDB 副本集部署", "MongoDB分片集群部署": "MongoDB 分片集群部署", "MongoDB副本集部署": "MongoDB 副本集部署", - "【MongDB】分片集群管理": "【MongDB】分片集群管理", - "【MongDB】副本集集群管理": "【MongDB】副本集集群管理", - "【MongDB】授权规则": "【MongDB】授权规则", "MongoDB版本": "MongoDB 版本", "默认从n开始分配": "默认从 {0} 开始分配", "每台主机oplog容量占比": "每台主机oplog容量占比", @@ -2968,8 +2967,8 @@ "只支持恢复到15天全备时间点": "只支持恢复到15天全备时间点", "a. 支持 Stream、Pubsub,事务支持开发中;\nb. 支持eval,key 需要满足 hash_tag 特性;": "a. 支持 Stream、Pubsub,事务支持开发中;\nb. 支持eval,key 需要满足 hash_tag 特性;", "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;": "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;", - "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向 Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;": "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向 Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;", - "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;": "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;", + "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向 Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;": "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向 Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;", + "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;": "方式一: 域名(指向 Proxy Ips), 普通 Redis 客户端;\n方式二: 域名(指向Redis Ips), 智能 Redis 客户端, 自动处理 moved 错误;", "普通客户端:Redis Single 连接方式,Slot 与节点映射关系由 Proxy 自动处理;": "普通客户端:Redis Single 连接方式,Slot 与节点映射关系由 Proxy 自动处理;", "智能客户端:RedisCluster 连接方式,客户端自动维护 Slot 与节点映射关系,客户端自动处理 MOVED 错误;": "智能客户端:RedisCluster 连接方式,客户端自动维护 Slot 与节点映射关系,客户端自动处理 MOVED 错误;", "目标从库主机 n 不存在": "目标从库主机 {n} 不存在", @@ -3070,51 +3069,6 @@ "单机分片数": "单机分片数", "数量不能为空": "数量不能为空", "请输入数量": "请输入数量", - "Follower节点规格": "Follower 节点规格", - "Observer节点规格": "Observer 节点规格", - "【Doris】集群管理": "【Doris】集群管理", - "Doris集群部署": "Doris集群部署", - "申请Doris集群部署": "申请Doris集群部署", - "Doris版本": "Doris 版本", - "Follower节点": "Follower 节点", - "Observer节点": "Observer 节点", - "固定为n台": "固定为 {0} 台", - "查询端口": "查询端口", - "主机已被Follower节点使用": "主机已被 Follower 节点使用", - "主机已被Observer节点使用": "主机已被 Observer 节点使用", - "Follower节点IP": "Follower 节点 IP", - "Observer节点IP": "Observer 节点 IP", - "9010 和 9020 为服务内部占用端口": "9010 和 9020 为服务内部占用端口", - "与http端口互斥": "与 http 端口互斥", - "与查询端口互斥": "与查询端口互斥", - "至少添加一种节点IP": "至少添加一种节点 IP", - "name容量从n台扩容至n台": "{name} 容量从 {hostNumBefore} 台扩容至 {hostNumAfter} 台", - "name容量从n台缩容至n台": "{name} 容量从 {hostNumBefore} 台缩容至 {hostNumAfter} 台", - "至少缩容一种类型": "至少缩容一种类型", - "当前数量": "当前数量", - "确认禁用该集群?": "确认禁用该集群?", - "确认启用该集群?": "确认启用该集群?", - "启用后,将会恢复访问": "启用后,将会恢复访问", - "删除后将产生以下影响": "删除后将产生以下影响:", - "删除xxx集群": "删除 {0} 集群", - "删除xxx实例数据,停止相关进程": "删除 {xxx} 实例数据,停止相关进程", - "确认扩容集群?": "确认扩容集群?", - "若选择至少需要n台": "若选择至少需要 {0} 台", - "若选择至少需要n台,已选m台": "若选择至少需要 {0} 台,已选 {1} 台", - "扩容中": "扩容中", - "缩容中": "缩容中", - "替换中": "替换中", - "请保证冷/热节点至少存在一种": "请保证冷/热节点至少存在一种", - "Follower节点不支持缩容": "Follower节点不支持缩容", - "Follower类型节点若存在至少保留两台": "Follower类型节点若存在至少保留两台", - "冷/热 数据节点必选 1 种以上,每个角色至少需要 2 台": "冷/热 数据节点必选 1 种以上,每个角色至少需要 2 台", - "未完善": "未完善", - "扩容的节点 IP": "扩容的节点 IP", - "实例正在重启中,不能勾选": "实例正在重启中,不能勾选", - "较目标容量相差n台": ",较目标容量相差 {0} 台", - "较目标容量超出n台": ",较目标容量超出 {0} 台", - "Observer类型节点若存在至少保留两台": "Observer类型节点若存在至少保留两台", - "备份工具-TXSQL": "备份工具-TXSQL", "范围n_min_max": "范围 {n}, {min} ~ {max}", "请输入 where 条件,如:userId > 10000,不要带where关键字": "请输入 where 条件,如:userId > 10000,不要带where关键字", "Mongodb规格": "Mongodb规格", @@ -3135,8 +3089,8 @@ "禁用的集群不支持清档": "禁用的集群不支持清档", "请先添加链接的集群": "请先添加链接的集群", "立即添加": "立即添加", - "高可用-从域名": "高可用-从域名", - "高可用-主域名": "高可用-主域名", + "MySQL主从-从域名": "MySQL主从-从域名", + "MySQL主从-主域名": "MySQL主从-主域名", "复制已选": "复制已选", "复制所有": "复制所有", "域名:端口": "域名:端口", @@ -3144,8 +3098,37 @@ "无异常IP可复制": "无异常IP可复制", "已选集群的异常 IP": "已选集群的异常 IP", "暂无数据可复制": "暂无数据可复制", - "集群数量 / 每组主机部署集群需为整数": "集群数量 / 每组主机部署集群需为整数", - "必须大于当前台数n": "必须大于当前台数:{n}", + "变更后机器组数": "变更后机器组数", + "数据查询": "数据查询", + "清屏": "清屏", + "使用帮助": "使用帮助", + "连接的集群:xx": "连接的集群:{name}", + "连接的集群": "连接的集群", + "页签数量已达上限,请先关闭部分标": "页签数量已达上限,请先关闭部分标", + "字号调整": "字号调整", + "结束符后不允许有空白外的字符": "结束符后不允许有空白外的字符", + "查询结果数据量不能大于64M": "查询结果数据量不能大于64M", + "导出数据": "导出数据", + "目标 DB 名": "目标 DB 名", + "weher 条件": "weher 条件", + "导出原因": "导出原因", + "最多支持 5 个": "最多支持 5 个", + "where 条件": "where 条件", + "忽略表名:": "忽略表名:", + "数据和表结构": "数据和表结构", + "数据": "数据", + "下载结果文件": "下载结果文件", + "编辑授权规则": "编辑授权规则", + "编辑授权规则成功": "编辑授权规则成功", + "是否确认终止执行单据": "是否确认终止执行单据", + "终止执行后无法撤回,请谨慎操作!": "终止执行后无法撤回,请谨慎操作!", + "是否确认重试此步骤": "是否确认重试此步骤", + "终止": "终止", + "是否删除索引": "是否删除索引", + "支持 show databases、show tables from db1 等部分 show 语句": "支持 show databases、show tables from db1 等部分 show 语句", + "只能输入select,不支持 insert, delete, update,且 select 必须带limit控制行数,行数<=1000": "只能输入select,不支持 insert, delete, update,且 select 必须带limit控制行数,行数<=1000", + "暂时不支持 use 语句": "暂时不支持 use 语句", + "不允许访问系统库,如 mysql information_schema performance_schema db_infobase": "不允许访问系统库,如 mysql information_schema performance_schema db_infobase", "版本升级:接入层可直接原地升级,存储层需先创建相应版本的模块,连续版本可直接升级,跨版本需提供新机通过迁移完成升级;同机所有关联集群将一并升级": "版本升级:接入层可直接原地升级,存储层需先创建相应版本的模块,连续版本可直接升级,跨版本需提供新机通过迁移完成升级;同机所有关联集群将一并升级", "升级方式": "升级方式", "升级方式不能为空": "升级方式不能为空", @@ -3159,8 +3142,8 @@ "跳转新建模块": "跳转新建模块", "绑定模块不能为空": "绑定模块不能为空", "升级类型": "升级类型", - "适用于小版本升级,如 5.6.1 -> 5.6.2 ": "适用于小版本升级,如 5.6.1 -> 5.6.2 ", - "适用于大版本升级,如 5.6.0 -> 5.7.0": "适用于大版本升级,如 5.6.0 -> 5.7.0", + "适用于小版本升级,如 5.6.1 -> 5.6.2 ": "适用于小版本升级,如 5.6.1 -> 5.6.2 ", + "适用于大版本升级,如 5.6.0 -> 5.7.0": "适用于大版本升级,如 5.6.0 -> 5.7.0", "单节点仅支持原地升级": "单节点仅支持原地升级", "主从 - 接入层": "主从 - 接入层", "主从 - 存储层": "主从 - 存储层", @@ -3168,40 +3151,20 @@ "展开详情": "展开详情", "收起列表": "收起列表", "展开列表": "展开列表", - "是否确认终止执行单据": "是否确认终止执行单据", - "终止执行后无法撤回,请谨慎操作!": "终止执行后无法撤回,请谨慎操作!", - "是否确认重试此步骤": "是否确认重试此步骤", - "变更后机器组数": "变更后机器组数", - "数据查询": "数据查询", - "清屏": "清屏", - "使用帮助": "使用帮助", - "连接的集群:xx": "连接的集群:{name}", - "连接的集群": "连接的集群", - "页签数量已达上限,请先关闭部分标": "页签数量已达上限,请先关闭部分标", - "字号调整": "字号调整", - "结束符后不允许有空白外的字符": "结束符后不允许有空白外的字符", - "查询结果数据量不能大于64M": "查询结果数据量不能大于64M", + "版本包文件": "版本包文件", + "数据库版本不能为空": "数据库版本不能为空", + "版本包文件不能为空": "版本包文件不能为空", + "集群数量 / 每组主机部署集群需为整数": "集群数量 / 每组主机部署集群需为整数", + "必须大于当前台数n": "必须大于当前台数:{n}", + "除use dbname外,必须有结束符; 或": "除use dbname外,必须有结束符; 或 {n}", + "不允许访问系统库,如": "不允许访问系统库,如 {n}", "目标主库主机不存在": "目标主库主机不存在", - "编辑授权规则": "编辑授权规则", - "编辑授权规则成功": "编辑授权规则成功", - "导出数据": "导出数据", - "目标 DB 名": "目标 DB 名", - "weher 条件": "weher 条件", - "导出原因": "导出原因", - "最多支持 5 个": "最多支持 5 个", - "where 条件": "where 条件", - "忽略表名:": "忽略表名:", - "数据和表结构": "数据和表结构", - "数据": "数据", - "下载结果文件": "下载结果文件", "支持所有架构类型": "支持所有架构类型", "通用": "通用", "通用维护": "通用维护", "仅支持 TendisCache,TendisSSD,Tendisplus,RedisCluster 类型": "仅支持 TendisCache,TendisSSD,Tendisplus,RedisCluster 类型", "待重建的主机": "待重建的主机", "主机选择方式": "主机选择方式", - "终止": "终止", - "是否删除索引": "是否删除索引", "同机关联实例": "同机关联实例", "Proxy 实例": "Proxy 实例", "Proxy 主机": "Proxy 主机", @@ -3215,7 +3178,7 @@ "目标Proxy主机重复": "目标Proxy主机重复", "目标实例": "目标实例", "关联集群": "关联集群", - "缩容数量(台)": "缩容数量(台)", + "缩容数量(台)": "缩容数量(台)", "自动匹配": "自动匹配", "Master 主机": "Master 主机", "缩容后不能少于2台": "缩容后不能少于2台", @@ -3223,13 +3186,6 @@ "缩容后不能少于1台": "缩容后不能少于1台", "Master 缩容数量 (台)": "Master 缩容数量 (台)", "Slave 缩容数量 (台)": "Slave 缩容数量 (台)", - "支持 show databases、show tables from db1 等部分 show 语句": "支持 show databases、show tables from db1 等部分 show 语句", - "只能输入select,不支持 insert, delete, update,且 select 必须带limit控制行数,行数<=1000": "只能输入select,不支持 insert, delete, update,且 select 必须带limit控制行数,行数<=1000", - "暂时不支持 use 语句": "暂时不支持 use 语句", - "不允许访问系统库,如 mysql information_schema performance_schema db_infobase": "不允许访问系统库,如 mysql information_schema performance_schema db_infobase", - "版本包文件": "版本包文件", - "数据库版本不能为空": "数据库版本不能为空", - "版本包文件不能为空": "版本包文件不能为空", "当前密码": "当前密码", "关联主库主机": "关联主库主机", "构造到新集群": "构造到新集群", @@ -3258,23 +3214,22 @@ "1年": "1年", "巡检时间": "巡检时间", "指定备份记录": "指定备份记录", - "主库主机关联实例": "主库主机关联实例", - "缩容接入层:减加集群的Proxy数量,但集群Proxy数量不能少于2": "缩容接入层:减加集群的Proxy数量,但集群Proxy数量不能少于2", + "密码创建后平台将不会显露_,_请谨慎复制_,_": "密码创建后平台将不会显露 , 请谨慎复制 , ", "请设置密码": "请设置密码", - "单据超过n状态未变化,系统自动终止": "单据超过 {n}状态未变化,系统自动终止", - "超过n小时自动终止": "超过 {n} 小时未确认,自动终止", "超过n天未处理,自动终止": "超过 {n} 天未处理,自动终止", - "system已处理": "system 已处理", "不能选择临时集群": "不能选择临时集群", - "授权的IP": "授权的IP", - "生成的目标 DB 范式": "生成的目标 DB 范式", "账号创建后,不支持修改。": "账号创建后,不支持修改。", "平台不会保存密码,请自行保管好。": "平台不会保存密码,请自行保管好。", "Raw 模式": "Raw 模式", "开启后可正常显示中文": "开启后可正常显示中文", "关闭后,内容将不会再在保存,请谨慎操作!": "关闭后,内容将不会再在保存,请谨慎操作!", "确认关闭当前窗口?": "确认关闭当前窗口?", + "授权的IP": "授权的IP", + "生成的目标 DB 范式": "生成的目标 DB 范式", + "安全认证": "安全认证", + "复制安全认证": "复制安全认证", "n 个 SQL 文件": "{n} 个 SQL 文件", + "Doris集群部署": "Doris集群部署", "目标DB设置不正确": "目标DB设置不正确", "执行的 SQL": "执行的 SQL", "执行的 SQL 不能为空": "执行的 SQL 不能为空", @@ -3284,34 +3239,32 @@ "请添加 SQL": "请添加 SQL", "SQL 来源": "SQL 来源", "请添加 SQL 文件": "请添加 SQL 文件", - "安全认证": "安全认证", - "复制安全认证": "复制安全认证", + "DB名不允许重复": "DB名不允许重复", + "只支持读取类的指令": "只支持读取类的指令", + "get、mget指令,返回的value需小于1M": "get、mget指令,返回的value需小于1M", + "复合类型,返回member需小于1000": "复合类型,返回member需小于1000", + "目标主库主机格式不正确": "目标主库主机格式不正确", + "目标主库主机 n 不存在": "目标主库主机 {n} 不存在", "我的服务单": "我的服务单", "添加从库执行": "添加从库执行", + "请输入单个 IP": "请输入单个 IP", "如果变更 SQL 是“create database ...”,这个请填写 master": "如果变更 SQL 是“create database ...”,这个请填写 master", "忽略的 DB": "忽略的 DB", + "目标集群(always on 集群)": "目标集群(always on 集群)", "忽略 DB ": "忽略 DB ", "迁移 DB 名": "迁移 DB 名", "迁移后 DB 名": "迁移后 DB 名", - "只支持读取类的指令": "只支持读取类的指令", - "get、mget指令,返回的value需小于1M": "get、mget指令,返回的value需小于1M", - "复合类型,返回member需小于1000": "复合类型,返回member需小于1000", - "修改成功后,不会影响已授权的实例,新增的授权将会按照最新的配置生效": "修改成功后,不会影响已授权的实例,新增的授权将会按照最新的配置生效", - "差异确认": "差异确认", - "请确认以下差异变化:": "请确认以下差异变化 :", - "变更前": "变更前", - "变更后": "变更后", - "不变": "不变", - "权限:新增n个,删除m个": "权限 : 新增 {0} 个,删除 {1} 个", - "权限类型": "权限类型", - "提交失败": "提交失败", - "编辑时只能单个,且不能有分隔符": "编辑时只能单个,且不能有分隔符", - "DB名不允许重复": "DB名不允许重复", + "构造 DB 名称": "构造 DB 名称", + "构造后 DB 名称(自动生成,可修改)": "构造后 DB 名称(自动生成,可修改)", + "已存在的 DB(可修改)": "已存在的 DB(可修改)", "请输入集群域名或从表头批量选择": "请输入集群域名或从表头批量选择", "请输入管控区域:IP或从表头批量选择": "请输入 管控区域:IP 或从表头批量选择", "请输入IP或从表头批量选择": "请输入 IP 或从表头批量选择", "请输入IP:Port或从表头批量选择": "请输入 IP:Port 或从表头批量选择", "统一设置:将该列统一设置为相同的值": "统一设置:将该列统一设置为相同的值", + "构造后 DB 名称不能为空": "构造后 DB 名称不能为空", + "跟已存在的 DB 名冲突,请修改其一": "跟已存在的 DB 名冲突,请修改其一", + "和其它已填写数据重复": "和其它已填写数据重复", "继续": "继续", "确定继续吗": "确定继续吗", "人工确认节点列表": "人工确认节点列表", @@ -3322,18 +3275,11 @@ "确定继续所有节点任务": "确定继续所有节点任务", "确认继续": "确认继续", "继续任务成功": "继续任务成功", - "Redis版本": "Redis版本", - "当前分片数": "当前分片数", - "目标分片数": "目标分片数", - "原地变更": "原地变更", - "替换变更": "替换变更", - "机器数量": "机器数量", "新DB已存在": "新 DB 已存在", "只允许提交一种集群类型": "只允许提交一种集群类型", - "目标主库主机格式不正确": "目标主库主机格式不正确", - "目标主库主机 n 不存在": "目标主库主机 {n} 不存在", - "操作系统版本支持 n": "操作系统版本支持 {n}", - "Mongo 分片集群": "Mongo 分片集群", + "克隆表结构和数据": "克隆表结构和数据", + "克隆类型": "克隆类型", + "克隆DB名": "克隆 DB 名", "按Enter或失焦可完成内容输入": "按 Enter 或失焦可完成内容输入", "粘贴多个对象可用换行,空格或;,|分隔": "粘贴多个对象可用换行,空格或;,|分隔", "是否审批": "是否审批", @@ -3349,57 +3295,12 @@ "至少选择一个集群": "至少选择一个集群", "删除后,将不可恢复,请谨慎操作!": "删除后,将不可恢复,请谨慎操作!", "修改目标": "修改目标", - "克隆表结构和数据": "克隆表结构和数据", - "克隆类型": "克隆类型", - "克隆DB名": "克隆 DB 名", - "构造 DB 名称": "构造 DB 名称", - "构造后 DB 名称(自动生成,可修改)": "构造后 DB 名称(自动生成,可修改)", - "已存在的 DB(可修改)": "已存在的 DB(可修改)", - "构造后 DB 名称不能为空": "构造后 DB 名称不能为空", - "跟已存在的 DB 名冲突,请修改其一": "跟已存在的 DB 名冲突,请修改其一", - "和其它已填写数据重复": "和其它已填写数据重复", - "目标集群(always on 集群)": "目标集群(always on 集群)", - "请输入单个 IP": "请输入单个 IP", - "添加免审批": "添加免审批", - "所有集群已免审批": "所有集群已免审批", - "单据免审批设置": "单据免审批设置", - "内置策略为平台预设的审批规则,不可修改。根据业务需求,您可对全部或部分集群应用免审批策略。": "内置策略为平台预设的审批规则,不可修改。根据业务需求,您可对全部或部分集群应用免审批策略。", + "RedisCluster集群": "RedisCluster 集群", "% 或 ? 不允许单独使用": "% 或 ? 不允许单独使用", "不允许为 *": "不允许为 *", - "RedisCluster集群": "RedisCluster 集群", - "任务_待确认": "任务“待确认”", - "任务_执行成功": "任务“执行成功”", - "任务_执行失败": "任务“执行失败”", - "确认继续所有人工确认节点": "确认继续所有人工确认节点", - "已存在自定义的免审批": "已存在自定义的免审批", - "内置策略不支持编辑": "内置策略不支持编辑", - "编辑免审批": "编辑免审批", - "主机数量 - 按DB类型统计": "主机数量 - 按DB类型统计", - "分布情况": "分布情况", - "地域 - 园区": "地域 - 园区", - "请选择园区": "请选择园区", - "数量 (台)": "数量 (台)", - "规格类型": "规格类型", - "园区分布(台)": "园区分布(台)", - "总数(台)": "总数(台)", - "聚合维度": "聚合维度", - "专用业务 + 地域 + 规格": "专用业务 + 地域 + 规格", - "专用业务 + 地域 + 机型(硬盘)": "专用业务 + 地域 + 机型(硬盘)", - "机型(硬盘)": "机型(硬盘)", - "导出列表内容": "导出列表内容", - "CPU 内存": "CPU 内存", - "数量(台)": "数量(台)", - "统计视图": "统计视图", - "主机列表": "主机列表", "库表名支持数字、字母、中划线、下划线,最大35字符": "库表名支持数字、字母、中划线、下划线,最大35字符", "不允许输入系统库和特殊库": "不允许输入系统库和特殊库", "不能以stage_truncate开头或dba_rollback结尾": "不能以 stage_truncate 开头或 dba_rollback 结尾", - "添加免审批后,相关单据可直接进入下一环节,无需经过审批流程。免审批可应用于业务下的全部集群或特定部分集群。": "添加免审批后,相关单据可直接进入下一环节,无需经过审批流程。免审批可应用于业务下的全部集群或特定部分集群。", - "免审批目标": "免审批目标", - "需审批": "需审批", - "需确认": "需确认", - "免确认": "免确认", - "确定删除策略?": "确定删除策略?", "全局配置": "全局配置", "分片数": "分片数", "SQlServer_工具箱": "SQlServer 工具箱", @@ -3490,6 +3391,19 @@ "DB 名处理:": "DB 名处理:", "备份记录(d):预期返回 n 个 DB 的备份记录,实际返回 m 个": "备份记录({0}):预期返回 {1} 个 DB 的备份记录,实际返回 {2} 个", "高版本不能恢复到低版本": "高版本不能恢复到低版本", + "添加免审批": "添加免审批", + "所有集群已免审批": "所有集群已免审批", + "单据免审批设置": "单据免审批设置", + "内置策略为平台预设的审批规则,不可修改。根据业务需求,您可对全部或部分集群应用免审批策略。": "内置策略为平台预设的审批规则,不可修改。根据业务需求,您可对全部或部分集群应用免审批策略。", + "已存在自定义的免审批": "已存在自定义的免审批", + "内置策略不支持编辑": "内置策略不支持编辑", + "编辑免审批": "编辑免审批", + "添加免审批后,相关单据可直接进入下一环节,无需经过审批流程。免审批可应用于业务下的全部集群或特定部分集群。": "添加免审批后,相关单据可直接进入下一环节,无需经过审批流程。免审批可应用于业务下的全部集群或特定部分集群。", + "免审批目标": "免审批目标", + "需审批": "需审批", + "需确认": "需确认", + "免确认": "免确认", + "确定删除策略?": "确定删除策略?", "不允许输入系统库和特殊库 n": "不允许输入系统库和特殊库 {n}", "不允许输入系统库,如\"msdb\", \"model\", \"tempdb\", \"Monitor\"": "不允许输入系统库,如\"msdb\", \"model\", \"tempdb\", \"Monitor\"", "不允许输入系统库,如\"master\", \"msdb\", \"model\", \"tempdb\", \"Monitor\"": "不允许输入系统库,如\"master\", \"msdb\", \"model\", \"tempdb\", \"Monitor\"", @@ -3498,53 +3412,48 @@ "单元格可同时输入多个对象,使用换行,空格或;,|分隔,按 Enter 或失焦完成内容输入": "单元格可同时输入多个对象,使用换行,空格或;,|分隔,按 Enter 或失焦完成内容输入", "包含通配符时, 每一单元格只允许输入单个对象。% 不能独立使用, * 只能单独使用": "包含通配符时, 每一单元格只允许输入单个对象。% 不能独立使用, * 只能单独使用", "查看域名/IP对应关系": "查看域名/IP对应关系", + "确认继续所有人工确认节点": "确认继续所有人工确认节点", "请先选择待回档集群": "请先选择待回档集群", "请先添加待回档集群": "请先添加待回档集群", "任务": "任务", - "仅DataNode类型的节点支持替换": "仅DataNode类型的节点支持替换", - "统一设置": "统一设置", + "Redis版本": "Redis版本", + "当前分片数": "当前分片数", + "目标分片数": "目标分片数", + "原地变更": "原地变更", + "替换变更": "替换变更", + "机器数量": "机器数量", "处理时间": "处理时间", "提单人": "提单人", - "权限变更前后对比:新增n个,删除m个": "权限变更前后对比 : 新增 {0} 个,删除 {1} 个", - "预览权限": "预览权限", - "权限名称": "权限名称", - "访问的DB": "访问的DB", - "权限预览": "权限预览", - "账号下已存在该规则": "账号下已存在该规则", - "访问DB变更前后对比": "访问DB变更前后对比", - "复制所属集群": "复制所属集群", - "后端存储": "后端存储", - "TendisCache后端存储": "TendisCache 后端存储", - "TendisSSD后端存储": "TendisSSD 后端存储", - "TendisPlus后端存储": "TendisPlus 后端存储", - "DataNode节点": "DataNode 节点", - "NameNode_Zookeeper_JournalNode节点": "NameNode_Zookeeper_JournalNode 节点", - "副本集/ShardSvr": "副本集/ShardSvr", - "必须要能除尽总分片数": "必须要能除尽总分片数", - "变更机器组数": "变更机器组数", - "DB名称支持通配符_如Data_区分大小写_多个使用英文逗号_分号或换行分隔": "DB名称支持通配符_如Data_区分大小写_多个使用英文逗号_分号或换行分隔", + "我的申请": "我的申请", + "我负责的业务": "我负责的业务", + "统一设置": "统一设置", + "仅DataNode类型的节点支持替换": "仅DataNode类型的节点支持替换", "库表输入说明": "库表输入说明", "不允许输入系统库和特殊库,如mysql、sys 等": "不允许输入系统库和特殊库,如mysql、sys 等", "支持 %(指代任意长度字符串), ?(指代单个字符串), *(指代全部)三个通配符": "支持 %(指代任意长度字符串), ?(指代单个字符串), *(指代全部)三个通配符", "包含通配符时, 每一单元格只允许输入单个对象。% ? 不能独立使用, * 只能单独使用": "包含通配符时, 每一单元格只允许输入单个对象。% ? 不能独立使用, * 只能单独使用", - "单节点规格": "单节点规格", - "主从规格": "主从规格", - "我的申请": "我的申请", - "我负责的业务": "我负责的业务", - "选择实例": "选择实例", - "格式不正确": "格式不正确", - "ip不存在": "ip不存在", - "请输入或选择主机": "请输入或选择主机", - "实例/IP重复": "实例/IP重复", - "同主机关联的其他集群,勾选后一同克隆": "同主机关联的其他集群,勾选后一同克隆", + "复制所属集群": "复制所属集群", + "公共资源池": "公共资源池", + "统计视图": "统计视图", + "规格类型": "规格类型", + "机型(硬盘)": "机型(硬盘)", + "CPU 内存": "CPU 内存", + "园区分布(台)": "园区分布(台)", + "地域 - 园区": "地域 - 园区", "所属DB类型": "所属DB类型", "请选择所属业务": "请选择所属业务", "请选择所属DB类型": "请选择所属DB类型", + "总数(台)": "总数(台)", + "聚合维度": "聚合维度", + "导出列表内容": "导出列表内容", + "数量(台)": "数量(台)", + "主机列表": "主机列表", "资源分布统计": "资源分布统计", "地域 + 规格": "地域 + 规格", "地域 + 机型(硬盘)": "地域 + 机型(硬盘)", "资源分布统计(地域 + 规格)": "资源分布统计(地域 + 规格)", "资源分布统计(地域 + 机型)": "资源分布统计(地域 + 机型)", + "主机数量 - 按DB类型统计": "主机数量 - 按DB类型统计", "TendbCluster-主域名": "TendbCluster-主域名", "TendbCluster-从域名": "TendbCluster-从域名", "日期类型(date)": "日期类型(date)", @@ -3553,6 +3462,7 @@ "整型(int)": "整型(int)", "整型(bigint)": "整型(bigint)", "新proxy主机": "新proxy主机", + "必须要能除尽总分片数": "必须要能除尽总分片数", "开启弱密码检测": "开启弱密码检测", "开启后,不允许超过 x 位连续字符,如出现以下示例密码将无法通过检测": "开启后,不允许超过 {x} 位连续字符,如出现以下示例密码将无法通过检测", "连续键盘序_如_xx": "连续键盘序,如:{0}", @@ -3569,6 +3479,7 @@ "中的任意 n 种": "中的任意 {n} 种", "不允许超过 x 位连续字符": "不允许超过 {x} 位连续字符", "不允许的字符: s": "不允许的字符: {s}", + "包含特殊字符_除空格外": "包含特殊字符_除空格外", "请先添加实例": "请先添加实例", "【SQLServer】授权规则": "【SQLServer】授权规则", "【MySQL】授权规则": "【MySQL】授权规则", @@ -3586,18 +3497,89 @@ "特殊字符不允许包含空格": "特殊字符不允许包含空格", "请输入除大小写字母、数字外的英文半角字符": "请输入除大小写字母、数字外的英文半角字符", "请输入英文半角字符,重复字符将去重": "请输入英文半角字符,重复字符将去重", + "Follower节点规格": "Follower 节点规格", + "Observer节点规格": "Observer 节点规格", + "【Doris】集群管理": "【Doris】集群管理", + "申请Doris集群部署": "申请Doris集群部署", + "Doris版本": "Doris 版本", + "Follower节点": "Follower 节点", + "Observer节点": "Observer 节点", + "固定为n台": "固定为 {0} 台", + "查询端口": "查询端口", + "主机已被Follower节点使用": "主机已被 Follower 节点使用", + "主机已被Observer节点使用": "主机已被 Observer 节点使用", + "Follower节点IP": "Follower 节点 IP", + "Observer节点IP": "Observer 节点 IP", + "9010 和 9020 为服务内部占用端口": "9010 和 9020 为服务内部占用端口", + "与http端口互斥": "与 http 端口互斥", + "与查询端口互斥": "与查询端口互斥", + "至少添加一种节点IP": "至少添加一种节点 IP", + "name容量从n台扩容至n台": "{name} 容量从 {hostNumBefore} 台扩容至 {hostNumAfter} 台", + "name容量从n台缩容至n台": "{name} 容量从 {hostNumBefore} 台缩容至 {hostNumAfter} 台", + "至少缩容一种类型": "至少缩容一种类型", + "当前数量": "当前数量", + "确认禁用该集群?": "确认禁用该集群?", + "确认启用该集群?": "确认启用该集群?", + "启用后,将会恢复访问": "启用后,将会恢复访问", + "删除后将产生以下影响": "删除后将产生以下影响:", + "删除xxx集群": "删除 {0} 集群", + "删除xxx实例数据,停止相关进程": "删除 {xxx} 实例数据,停止相关进程", + "确认扩容集群?": "确认扩容集群?", + "若选择至少需要n台": "若选择至少需要 {0} 台", + "若选择至少需要n台,已选m台": "若选择至少需要 {0} 台,已选 {1} 台", + "扩容中": "扩容中", + "缩容中": "缩容中", + "替换中": "替换中", + "请保证冷/热节点至少存在一种": "请保证冷/热节点至少存在一种", + "Follower节点不支持缩容": "Follower节点不支持缩容", + "Follower类型节点若存在至少保留两台": "Follower类型节点若存在至少保留两台", + "冷/热 数据节点必选 1 种以上,每个角色至少需要 2 台": "冷/热 数据节点必选 1 种以上,每个角色至少需要 2 台", + "未完善": "未完善", + "扩容的节点 IP": "扩容的节点 IP", + "实例正在重启中,不能勾选": "实例正在重启中,不能勾选", + "较目标容量相差n台": ",较目标容量相差 {0} 台", + "较目标容量超出n台": ",较目标容量超出 {0} 台", + "Observer类型节点若存在至少保留两台": "Observer类型节点若存在至少保留两台", "主从主机": "主从主机", "只读主机": "只读主机", "新主从主机": "新主从主机", "新只读主机": "新只读主机", "请输入n台IP_英文逗号或换行分隔": "请输入 {n} 台IP_英文逗号或换行分隔", "请输入n台IP": "请输入 {n} 台IP", - "无只读主机": "无只读主机", - "IP 视角": "IP 视角", - "导出结果表": "导出结果表", - "复制 IP": "复制 IP", - "查询条件": "查询条件", - "源客户端 IP": "源客户端 IP", + "标签": "标签", + "标签:": "标签:", + "新建标签": "新建标签", + "请输入标签关键字": "请输入标签关键字", + "绑定的IP": "绑定的IP", + "确认删除该标签值?": "确认删除该标签值?", + "资源标签": "资源标签", + "更新成功": "更新成功", + "该标签已被绑定 ,不能删除": "该标签已被绑定 ,不能删除", + "设置属性": "设置属性", + "添加资源归属": "添加资源归属", + "转为公共资源": "转为公共资源", + "移入待回收池": "移入待回收池", + "移入故障池": "移入故障池", + "撤销导入": "撤销导入", + "搜索 IP 多个 | 或换行(Shift + Enter)分隔": "搜索 IP 多个 | 或换行(Shift + Enter)分隔", + "标签搜索": "标签搜索", + "资源归属": "资源归属", + "确认批量将 {n} 台主机转入回收池?": "确认批量将 {n} 台主机转入回收池?", + "确认将 {n} 台主机转为公共资源?": "确认将 {n} 台主机转为公共资源?", + "确认批量将 {n} 台主机转入故障池?": "确认批量将 {n} 台主机转入故障池?", + "确认批量撤销 {n} 台主机的导入?": "确认批量撤销 {n} 台主机的导入?", + "已选择以下": "已选择以下", + "共n台": "共 {0} 台", + "已选择以下n台主机": "已选择以下 {0} 台主机", + "确认后,主机将从资源池移回原有模块": "确认后,主机将从资源池移回原有模块", + "所属DB": "所属DB", + "Mongo 分片集群": "Mongo 分片集群", + "单节点规格": "单节点规格", + "主从规格": "主从规格", + "等待中": "等待中", + "待审批": "待审批", + "待补货": "待补货", + "定时中": "定时中", "权限查询": "权限查询", "请选择或输入,支持%": "请选择或输入,支持%", "至多n台_已选n台": "至多 {0} 台,已选 {1} 台", @@ -3623,5 +3605,23 @@ "修改": "修改", "存储层(Nodes)": "存储层(Nodes)", "存储层(Nodes)域名": "存储层(Nodes)域名", + "我的已办": "我的已办", + "操作系统": "操作系统", + "确认后,将主机标记为待回收,等待处理": "确认后,将主机标记为待回收,等待处理", + "确认后,将主机标记为故障,等待处理": "确认后,将主机标记为故障,等待处理", + "编辑资源归属": "编辑资源归属", + "资源标签管理": "资源标签管理", + "确认后,将主机清空已存在的资源归属设置,并设置为公共资源": "确认后,将主机清空已存在的资源归属设置,并设置为公共资源", + "确认后,主机将标记为待回收,等待处理": "确认后,主机将标记为待回收,等待处理", + "确认后,主机将标记为故障,等待处理": "确认后,主机将标记为故障,等待处理", + "确认后,主机将标记为业务专属": "确认后,主机将标记为业务专属", + "确认转入待回收池?": "确认转入待回收池?", + "确认批量将 {n} 台主机转入待回收池": "确认批量将 {n} 台主机转入待回收池", + "确认批量将 {n} 台主机转入业务资源池": "确认批量将 {n} 台主机转入业务资源池", + "确认撤销导入?": "确认撤销导入?", + "确认后,将主机将清空已存在的资源归属设置,并设置为公共资源": "确认后,将主机将清空已存在的资源归属设置,并设置为公共资源", + "确认批量将 {n} 台主机转入业务资源池?": "确认批量将 {n} 台主机转入业务资源池?", + "确认转入待故障池?": "确认转入待故障池?", + "跳转管理页": "跳转管理页", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/router/index.ts b/dbm-ui/frontend/src/router/index.ts index 354892b2b6..593b935923 100644 --- a/dbm-ui/frontend/src/router/index.ts +++ b/dbm-ui/frontend/src/router/index.ts @@ -30,6 +30,7 @@ import getQuickSearchRoutes from '@views/quick-search/routes'; import getResourceManageRoutes from '@views/resource-manage/routes'; import getServiceApplyRoutes from '@views/service-apply/routes'; import getStaffManageRoutes from '@views/staff-manage/routes'; +import getResourceTagRoutes from '@views/tag-manage/routes'; import getTaskHistoryRoutes from '@views/task-history/routes'; import getTemporaryPasswordModify from '@views/temporary-paassword-modify/routes'; import getTicketRoutes from '@views/ticket-center/routes'; @@ -127,6 +128,7 @@ export default () => { { path: `${rootPath}${currentBiz}`, children: [ + ...getResourceTagRoutes(), ...getDbManageRoutes(), ...getDbConfRoutes(), ...getDbhaSwitchEventsRouters(), diff --git a/dbm-ui/frontend/src/services/model/db-resource/DbResource.ts b/dbm-ui/frontend/src/services/model/db-resource/DbResource.ts index 4a92f1c4eb..0af3f22651 100644 --- a/dbm-ui/frontend/src/services/model/db-resource/DbResource.ts +++ b/dbm-ui/frontend/src/services/model/db-resource/DbResource.ts @@ -38,7 +38,10 @@ export default class DbResource { bk_biz_name: string; }; ip: string; - label: string; + labels: { + name: string; + id: number; + }[]; net_device_id: string; os_bit: string; os_type: string; @@ -81,7 +84,7 @@ export default class DbResource { this.device_class = payload.device_class; this.for_biz = payload.for_biz; this.ip = payload.ip; - this.label = payload.label; + this.labels = payload.labels; this.net_device_id = payload.net_device_id; this.os_bit = payload.os_bit; this.os_type = payload.os_type; @@ -117,6 +120,6 @@ export default class DbResource { if (!this.resource_type || this.resource_type === 'PUBLIC') { return t('通用'); } - return DBTypeInfos[this.resource_type as DBTypes].name; + return DBTypeInfos[this.resource_type as DBTypes]?.name; } } diff --git a/dbm-ui/frontend/src/services/model/db-resource/ResourceTag.ts b/dbm-ui/frontend/src/services/model/db-resource/ResourceTag.ts new file mode 100644 index 0000000000..f461debeeb --- /dev/null +++ b/dbm-ui/frontend/src/services/model/db-resource/ResourceTag.ts @@ -0,0 +1,45 @@ +/* + * 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 dayjs from 'dayjs'; + +import { utcDisplayTime } from '@utils'; + +export default class ResourceTag { + create_at: string; // 创建时间 + creator: string; // 创建人 + id: number; // 标签ID + is_builtin: boolean; // 是否内置标签 + update_at: string; // 更新时间 + value: string; // 标签名 + + constructor(payload = {} as ResourceTag) { + this.create_at = payload.create_at || ''; + this.creator = payload.creator || ''; + this.id = payload.id || 0; + this.is_builtin = payload.is_builtin || false; + this.update_at = payload.update_at || ''; + this.value = payload.value || ''; + } + + get isNewCreated() { + return dayjs().isBefore(dayjs(this.create_at).add(24, 'hour')); + } + + get createAtDisplay() { + return utcDisplayTime(this.create_at); + } + + get updatedAtDisplay() { + return utcDisplayTime(this.update_at); + } +} diff --git a/dbm-ui/frontend/src/services/model/function-controller/functionController.ts b/dbm-ui/frontend/src/services/model/function-controller/functionController.ts index cd1e8a7c7b..fa854d06f7 100644 --- a/dbm-ui/frontend/src/services/model/function-controller/functionController.ts +++ b/dbm-ui/frontend/src/services/model/function-controller/functionController.ts @@ -72,8 +72,11 @@ interface ControllerData { 'resourceManage.resourceSpec': ControllerItem; 'resourceManage.resourcePool': ControllerItem; 'resourceManage.dirtyHostManage': ControllerItem; + 'resourceManage.resourceTagsManagement': ControllerItem; 'resourceManage.resourceOperationRecord': ControllerItem; bizConfigManage: ControllerItem; + 'bizConfigManage.businessResourcePool': ControllerItem; + 'bizConfigManage.businessResourceTag': ControllerItem; 'bizConfigManage.monitorStrategy': ControllerItem; 'bizConfigManage.alarmGroup': ControllerItem; 'bizConfigManage.dbConfigure': ControllerItem; diff --git a/dbm-ui/frontend/src/services/source/dbresourceResource.ts b/dbm-ui/frontend/src/services/source/dbresourceResource.ts index 39ab16639e..f91c80614c 100644 --- a/dbm-ui/frontend/src/services/source/dbresourceResource.ts +++ b/dbm-ui/frontend/src/services/source/dbresourceResource.ts @@ -25,7 +25,7 @@ const path = '/apis/dbresource/resource'; /** * 资源删除 */ -export function removeResource(params: { bk_host_ids: number[] }) { +export function removeResource(params: { bk_host_ids: number[]; event: 'to_recycle' | 'to_fault' | 'undo_import' }) { return http.post<{ bk_host_ids: number[] }>(`${path}/delete/`, params); } @@ -61,6 +61,7 @@ export function importResource(params: { host_id: number; bk_cloud_id: number; }>; + labels: number; }) { return http.post(`${path}/import/`, params); } @@ -165,6 +166,7 @@ export function getSpecResourceCount(params: { */ export function updateResource(params: { bk_host_ids: number[]; + labels?: number[]; for_biz: number; rack_id: string; resource_type: string; diff --git a/dbm-ui/frontend/src/services/source/tag.ts b/dbm-ui/frontend/src/services/source/tag.ts new file mode 100644 index 0000000000..14c2f7a146 --- /dev/null +++ b/dbm-ui/frontend/src/services/source/tag.ts @@ -0,0 +1,75 @@ +import ResourceTagModel from '@services/model/db-resource/ResourceTag'; +import type { ListBase } from '@services/types/listBase'; + +import http from '../http'; + +const path = '/apis/tag/'; + +/** + * 查询资源标签 + */ +export function listTag(params: { + value?: string; + bind_ips?: string[]; + creator?: string; + bk_biz_id?: number; + limit?: number; + offset?: number; +}) { + return http.get>(`${path}`, params).then((res) => ({ + ...res, + results: res.results.map((item: ResourceTagModel) => new ResourceTagModel(item)), + })); +} + +/** + * 新增资源标签 + */ +export function createTag(params: { + bk_biz_id: number; + tags: { + key: string; // 固定为 dbresource + value: string; + }[]; +}) { + return http.post(`${path}batch_create/`, params); +} + +/** + * 批量删除资源标签 + */ +export function deleteTag(params: { bk_biz_id: number; ids: number[] }) { + return http.delete(`${path}batch_delete/`, params); +} + +/** + * 编辑资源标签 + */ +export function updateTag(params: { bk_biz_id: number; id: number; value: string }) { + return http.patch(`${path}${params.id}/`, params); +} + +/** + * 校验标签是否重复,并返回重复的标签值 + */ +export function validateTag(params: { + bk_biz_id: number; + tags: { + key: string; + value: string; + }[]; +}) { + return http.post<{ key: string; value: string }[]>(`${path}verify_duplicated/`, params); +} + +/** + * 根据标签id获取关联IP + */ +export function getTagRelatedResource(params: { bk_biz_id: number; ids: number[]; resource_type?: string }) { + return http.post< + { + id: number; + ip_count: number; + }[] + >(`${path}related_resources/`, params); +} diff --git a/dbm-ui/frontend/src/stores/globalBizs.ts b/dbm-ui/frontend/src/stores/globalBizs.ts index 90326f745e..9dc83e575d 100644 --- a/dbm-ui/frontend/src/stores/globalBizs.ts +++ b/dbm-ui/frontend/src/stores/globalBizs.ts @@ -29,6 +29,11 @@ export const useGlobalBizs = defineStore('GlobalBizs', { }), getters: { currentBizInfo: (state): BizItem | undefined => state.bizs.find((item) => item.bk_biz_id === state.currentBizId), + bizIdMap: (state) => + state.bizs.reduce>((map, biz) => { + map.set(biz.bk_biz_id, biz); + return map; + }, new Map()), }, actions: { /** diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/business/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/business/Index.vue new file mode 100644 index 0000000000..af3d5b9d48 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/business/Index.vue @@ -0,0 +1,89 @@ + + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/Index.vue new file mode 100644 index 0000000000..04110b2811 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/Index.vue @@ -0,0 +1,579 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/HostOperationTip.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/HostOperationTip.vue new file mode 100644 index 0000000000..0684e08802 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/HostOperationTip.vue @@ -0,0 +1,114 @@ + + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/ImportHostBtn.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/ImportHostBtn.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/ImportHostBtn.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/ImportHostBtn.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/RenderTable.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/RenderTable.vue similarity index 99% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/RenderTable.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/RenderTable.vue index c9b237efc8..47f352f5cd 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/RenderTable.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/RenderTable.vue @@ -27,6 +27,7 @@ :pagination="pagination" :pagination-heihgt="60" remote-pagination + :row-class="rowCls" show-overflow-tooltip v-bind="$attrs" @column-sort="handleColumnSortChange" @@ -87,6 +88,7 @@ paginationExtra?: IPaginationExtra; selectable?: boolean; disableSelectMethod?: (data: any) => boolean | string; + rowCls?: string; // data 数据的主键 primaryKey?: string; } diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/Index.vue new file mode 100644 index 0000000000..bcc5d1fc10 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/Index.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/FormPanel.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/FormPanel.vue new file mode 100644 index 0000000000..5c4efa5a92 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/FormPanel.vue @@ -0,0 +1,176 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/ListPanel.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/ListPanel.vue new file mode 100644 index 0000000000..9915a0362b --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-assign/components/ListPanel.vue @@ -0,0 +1,266 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-convert-to-business/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-convert-to-business/Index.vue new file mode 100644 index 0000000000..9a20fd0f79 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-convert-to-business/Index.vue @@ -0,0 +1,78 @@ + + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-covert-to-public/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-covert-to-public/Index.vue new file mode 100644 index 0000000000..091ffa1bdb --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-covert-to-public/Index.vue @@ -0,0 +1,77 @@ + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-fault-pool/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-fault-pool/Index.vue new file mode 100644 index 0000000000..6cefab2c9c --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-fault-pool/Index.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-recycle-pool/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-recycle-pool/Index.vue new file mode 100644 index 0000000000..9a4d01ddb1 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-move-to-recycle-pool/Index.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/batch-setting/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-setting/Index.vue similarity index 86% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/batch-setting/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-setting/Index.vue index 72ab99470a..3b9d51980a 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/batch-setting/Index.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-setting/Index.vue @@ -23,6 +23,7 @@
    ({ - for_biz: '', + for_biz: undefined, rack_id: '', resource_type: '', storage_spec: [] as IStorageSpecItem[], @@ -109,35 +112,24 @@ const formRef = ref(); const isSubmiting = ref(false); - const bizList = shallowRef< - { - bk_biz_id: string; - display_name: string; - }[] - >([]); - const dbTypeList = shallowRef< - { - id: string; - name: string; - }[] - >([]); + const bizList = shallowRef>([]); + const dbTypeList = shallowRef>([]); + const formData = reactive(genDefaultData()); const isSubmitDisabled = computed( - () => !(formData.for_biz || formData.resource_type || formData.storage_spec.length > 0), + () => !(formData.for_biz !== '' || formData.resource_type || formData.storage_spec.length > 0), ); useRequest(getBizs, { onSuccess(data) { - const cloneData = data.map((item) => ({ - bk_biz_id: `${item.bk_biz_id}`, - display_name: item.display_name, - })); - cloneData.unshift({ - bk_biz_id: '0', - display_name: t('公共资源池'), - }); - bizList.value = cloneData; + bizList.value = [ + { + bk_biz_id: 0, + display_name: t('公共资源池'), + } as BizItem, + ...data, + ]; }, }); @@ -157,7 +149,7 @@ formRef.value .validate() .then(() => { - const storageDevice = formData.storage_spec.reduce( + const storageDevice = formData.storage_spec.reduce>( (result, item) => ({ ...result, [item.mount_point]: { @@ -165,11 +157,11 @@ disk_type: item.type, }, }), - {} as Record, + {}, ); return updateResource({ bk_host_ids: props.data.map((item) => ~~item), - for_biz: Number(formData.for_biz), + for_biz: formData.for_biz, rack_id: formData.rack_id, resource_type: formData.resource_type, storage_device: storageDevice, diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/batch-setting/components/ResourceSpecStorage.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-setting/components/ResourceSpecStorage.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/batch-setting/components/ResourceSpecStorage.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-setting/components/ResourceSpecStorage.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-undo-import/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-undo-import/Index.vue new file mode 100644 index 0000000000..12250d2e10 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/batch-undo-import/Index.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/import-host/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/import-host/Index.vue similarity index 81% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/import-host/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/import-host/Index.vue index 89e9255de8..389572c4a2 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/import-host/Index.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/import-host/Index.vue @@ -17,6 +17,7 @@ class="import-host-dialog" :esc-close="false" :quick-close="false" + render-directive="if" :width="width"> {{ t('确定') }} @@ -60,7 +62,8 @@ - + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/review-data-dialog/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/review-data-dialog/Index.vue new file mode 100644 index 0000000000..0a134f0da0 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/review-data-dialog/Index.vue @@ -0,0 +1,158 @@ + + + + + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/Index.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/Index.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/Index.vue similarity index 98% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/Index.vue index 2977fe784e..b3630d1e4d 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/Index.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/Index.vue @@ -52,6 +52,7 @@ import DiskType from './components/DiskType.vue'; import ForBiz from './components/ForBiz.vue'; import Hosts from './components/Hosts.vue'; + import Label from './components/Label.vue'; import Mem from './components/Mem.vue'; import MountPoint from './components/MountPoint.vue'; import OSType from './components/OSType.vue'; @@ -89,6 +90,7 @@ mount_point: MountPoint, cpu: Cpu, mem: Mem, + label: Label, disk: Disk, disk_type: DiskType, city: CitySubzones, diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/AgentStatus.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/AgentStatus.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/AgentStatus.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/AgentStatus.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/BkCloudIds.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/BkCloudIds.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/BkCloudIds.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/BkCloudIds.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/CitySubzones.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/CitySubzones.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/CitySubzones.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/CitySubzones.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Cpu.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Cpu.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Cpu.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Cpu.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/DeviceClass.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/DeviceClass.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/DeviceClass.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/DeviceClass.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Disk.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Disk.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Disk.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Disk.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/DiskType.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/DiskType.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/DiskType.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/DiskType.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/ForBiz.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/ForBiz.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/ForBiz.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/ForBiz.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Hosts.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Hosts.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Hosts.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Hosts.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Label.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Label.vue new file mode 100644 index 0000000000..2a1ca49b99 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Label.vue @@ -0,0 +1,84 @@ + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Mem.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Mem.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/Mem.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/Mem.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/MountPoint.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/MountPoint.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/MountPoint.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/MountPoint.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/OSType.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/OSType.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/OSType.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/OSType.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/ResourceType.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/ResourceType.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/ResourceType.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/ResourceType.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/SpecId.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/SpecId.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/com-factory/components/SpecId.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/com-factory/components/SpecId.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-config.ts b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-config.ts similarity index 98% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-config.ts rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-config.ts index bb728254d9..b807008e0c 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-config.ts +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-config.ts @@ -135,6 +135,11 @@ export default { return true; }, }, + label: { + label: t('标签'), + component: 'label', + type: 'string', + }, disk: { label: t('磁盘(G)'), component: 'disk', diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-input/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-input/Index.vue similarity index 96% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-input/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-input/Index.vue index 695d77fde0..f4cb42b674 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-input/Index.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-input/Index.vue @@ -70,6 +70,11 @@ :model="localValueMemo" name="mem" @change="handleChange" /> +
    @@ -159,6 +164,7 @@ os_type: true, cpu: true, mem: true, + label: true, mount_point: true, disk: true, disk_type: true, @@ -183,7 +189,7 @@ // 提交搜索,更新外部值 const handleSubmit = _.debounce( () => { - Promise.all(Object.values(inputRef.value).map((inputItem) => inputItem.getValue())).then(() => { + Promise.all(Object.values(inputRef.value).map((inputItem) => inputItem?.getValue())).then(() => { emits('update:modelValue', { ...localValueMemo.value, }); diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-input/components/CollectSearchParams.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-input/components/CollectSearchParams.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-input/components/CollectSearchParams.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-input/components/CollectSearchParams.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-tag/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-tag/Index.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-tag/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-tag/Index.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-tag/ValueTag.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-tag/ValueTag.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/field-tag/ValueTag.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/field-tag/ValueTag.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/utils.ts b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/utils.ts similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/components/search-box/components/utils.ts rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/search-box/components/utils.ts diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/panel/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/panel/Index.vue new file mode 100644 index 0000000000..e39ba0c0ed --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/panel/Index.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/selector/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/selector/Index.vue new file mode 100644 index 0000000000..3840ec85b4 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-research/selector/Index.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-selector/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-selector/Index.vue new file mode 100644 index 0000000000..6f6d4a547d --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/tag-selector/Index.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/update-assign/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/update-assign/Index.vue new file mode 100644 index 0000000000..06e0b090ce --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/components/update-assign/Index.vue @@ -0,0 +1,167 @@ + + + diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/hooks/useTableSetting.ts b/dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/hooks/useTableSetting.ts similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/host-list/hooks/useTableSetting.ts rename to dbm-ui/frontend/src/views/resource-manage/pool/components/host-list/hooks/useTableSetting.ts diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/Index.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/Index.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/BarChart.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/BarChart.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/BarChart.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/BarChart.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/DimensionSelect.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/DimensionSelect.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/DimensionSelect.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/DimensionSelect.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/Export.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/Export.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/Export.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/Export.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/List.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/List.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/List.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/List.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/Index.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/Index.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Biz.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Biz.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Biz.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Biz.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Db.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Db.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Db.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Db.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Region.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Region.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Region.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Region.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Spec.vue b/dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Spec.vue similarity index 100% rename from dbm-ui/frontend/src/views/resource-manage/pool/summary-view/components/search-box/components/Spec.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/components/summary-view/components/search-box/components/Spec.vue diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/global/Index.vue similarity index 73% rename from dbm-ui/frontend/src/views/resource-manage/pool/Index.vue rename to dbm-ui/frontend/src/views/resource-manage/pool/global/Index.vue index 5e716d0494..c413c07b7d 100644 --- a/dbm-ui/frontend/src/views/resource-manage/pool/Index.vue +++ b/dbm-ui/frontend/src/views/resource-manage/pool/global/Index.vue @@ -12,21 +12,30 @@ --> @@ -35,8 +44,8 @@ import { useDebouncedRef } from '@hooks'; - import HostList from './host-list/Index.vue'; - import SummaryView from './summary-view/Index.vue'; + import HostList from '../components/host-list/Index.vue'; + import SummaryView from '../components/summary-view/Index.vue'; const { t } = useI18n(); const router = useRouter(); @@ -74,7 +83,6 @@ params: { page: value, }, - query: {}, }); }; diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue b/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue deleted file mode 100644 index 586e5b1cef..0000000000 --- a/dbm-ui/frontend/src/views/resource-manage/pool/host-list/Index.vue +++ /dev/null @@ -1,343 +0,0 @@ - - - - - diff --git a/dbm-ui/frontend/src/views/resource-manage/pool/type.ts b/dbm-ui/frontend/src/views/resource-manage/pool/type.ts new file mode 100644 index 0000000000..53e363a426 --- /dev/null +++ b/dbm-ui/frontend/src/views/resource-manage/pool/type.ts @@ -0,0 +1,13 @@ +/** + * 资源池类型枚举值 + */ +export enum ResourcePool { + public = 'public', + global = 'global', + business = 'business', +} + +/** + * 资源池类型 + */ +export type ResourcePoolType = ResourcePool.business | ResourcePool.global | ResourcePool.public; diff --git a/dbm-ui/frontend/src/views/resource-manage/routes.ts b/dbm-ui/frontend/src/views/resource-manage/routes.ts index 6ab833b15c..4d8c87f2f8 100644 --- a/dbm-ui/frontend/src/views/resource-manage/routes.ts +++ b/dbm-ui/frontend/src/views/resource-manage/routes.ts @@ -23,7 +23,7 @@ const resourcePoolRoute = { navName: t('DB 资源池'), fullscreen: true, }, - component: () => import('@views/resource-manage/pool/Index.vue'), + component: () => import('@views/resource-manage/pool/global/Index.vue'), }; const resourcePoolOperationRecordRoute = { @@ -44,6 +44,15 @@ const resourcePoolDirtyMachinesRoute = { component: () => import('@views/resource-manage/dirty-machine/Index.vue'), }; +const resourceTagsManagementRoute = { + name: 'resourceTagsManagement', + path: 'tags-management', + meta: { + navName: t('资源标签管理'), + }, + component: () => import('@views/tag-manage/Index.vue'), +}; + const resourceSpecRoute = { name: 'resourceSpec', path: 'spec', @@ -82,6 +91,10 @@ export default function getRoutes() { mainRoute[0].children.push(resourcePoolDirtyMachinesRoute); } + if (checkDbConsole('resourceManage.resourceTagsManagement')) { + mainRoute[0].children.push(resourceTagsManagementRoute); + } + if (checkDbConsole('resourceManage.resourceOperationRecord')) { mainRoute[0].children.push(resourcePoolOperationRecordRoute); } diff --git a/dbm-ui/frontend/src/views/tag-manage/Index.vue b/dbm-ui/frontend/src/views/tag-manage/Index.vue new file mode 100644 index 0000000000..9a8217730c --- /dev/null +++ b/dbm-ui/frontend/src/views/tag-manage/Index.vue @@ -0,0 +1,440 @@ + + + + + + + + + diff --git a/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue b/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue new file mode 100644 index 0000000000..118a478b7d --- /dev/null +++ b/dbm-ui/frontend/src/views/tag-manage/components/BusinessSelector.vue @@ -0,0 +1,160 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue b/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue new file mode 100644 index 0000000000..a4acc621f9 --- /dev/null +++ b/dbm-ui/frontend/src/views/tag-manage/components/CreateTag.vue @@ -0,0 +1,178 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue b/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue new file mode 100644 index 0000000000..ce6a1c3960 --- /dev/null +++ b/dbm-ui/frontend/src/views/tag-manage/components/EditableCell.vue @@ -0,0 +1,99 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/views/tag-manage/routes.ts b/dbm-ui/frontend/src/views/tag-manage/routes.ts new file mode 100644 index 0000000000..4200a67b34 --- /dev/null +++ b/dbm-ui/frontend/src/views/tag-manage/routes.ts @@ -0,0 +1,41 @@ +/* + * 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 type { RouteRecordRaw } from 'vue-router'; + +import { checkDbConsole } from '@utils'; + +import { t } from '@locales/index'; + +const routes: RouteRecordRaw[] = [ + { + name: 'BizResourcePool', + path: 'pool/:page?', + meta: { + navName: t('资源池'), + fullscreen: true, + }, + component: () => import('@views/resource-manage/pool/business/Index.vue'), + }, + { + name: 'BizResourceTag', + path: 'business-resource-tag', + meta: { + navName: t('资源标签'), + }, + component: () => import('@views/tag-manage/Index.vue'), + }, +]; + +export default function getRoutes() { + return checkDbConsole('bizConfigManage.businessResourceTag') ? routes : []; +}