From 96dd0ec14694cc62fcdd102546f7000837c296c3 Mon Sep 17 00:00:00 2001 From: 3octaves <873551943@qq.com> Date: Fri, 18 Oct 2024 19:24:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20redis=E9=9B=86=E7=BE=A4?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89=E6=96=B9=E6=A1=88?= =?UTF-8?q?=20#7272?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/frontend/.vscode/settings.json | 69 ++++--------------- .../redis/clusterShardUpdate.ts | 5 +- .../redis/clusterTypeUpdate.ts | 5 +- .../page1/components/ClusterDeployPlan.vue | 16 ++--- .../page1/components/RenderTargetCapacity.vue | 31 ++++++--- .../pages/page1/Index.vue | 5 +- .../page1/components/RenderDeployPlan.vue | 24 ++++--- .../pages/page1/components/Row.vue | 6 +- .../cluster-type-update/pages/page1/Index.vue | 5 +- .../page1/components/RenderDeployPlan.vue | 24 ++++--- .../pages/page1/components/Row.vue | 6 +- .../common/cluster-deploy-plan/Index.vue | 11 +-- 12 files changed, 91 insertions(+), 116 deletions(-) diff --git a/dbm-ui/frontend/.vscode/settings.json b/dbm-ui/frontend/.vscode/settings.json index 1f2666a091..adf96464d8 100644 --- a/dbm-ui/frontend/.vscode/settings.json +++ b/dbm-ui/frontend/.vscode/settings.json @@ -1,60 +1,19 @@ { - "eslint.validate": ["javascript", "javascriptreact", "html", "vue"], - "eslint.alwaysShowStatus": true, + "files.eol": "\n", + "editor.unfoldOnClickAfterEndOfLine": true, + "editor.tabSize": 2, + "diffEditor.ignoreTrimWhitespace": false, + "typescript.updateImportsOnFileMove.enabled": "always", + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + "editor.fontLigatures": false, + "editor.fontVariations": false, + "i18n-lazyer.defaultFolder": "/src/locales", + "search.smartCase": true, "editor.codeActionsOnSave": { "source.fixAll": "explicit" }, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, + // "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "editor.tabSize": 2, - "css.validate": false, - "stylelint.enable": true, - "scss.validate": false, - "stylelint.validate": ["css", "scss", "vue"], - "preCI.localCodeCheck.filter.whitePath": "", - "preCI.localCodeCheck.filter.skipPath": "", - "preCI.localCodeCheck.checkerSet.JS": ["standard_js"], - "peacock.remoteColor": "#45e35f", - "bk-code-ai.enable": false, - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#71ea85", - "activityBar.background": "#71ea85", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#8874ea", - "activityBarBadge.foreground": "#15202b", - "commandCenter.border": "#15202b99", - "sash.hoverBorder": "#71ea85", - "statusBar.background": "#45e35f", - "statusBar.foreground": "#15202b", - "statusBarItem.hoverBackground": "#20d53e", - "statusBarItem.remoteBackground": "#45e35f", - "statusBarItem.remoteForeground": "#15202b", - "titleBar.activeBackground": "#45e35f", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveBackground": "#45e35f99", - "titleBar.inactiveForeground": "#15202b99" - }, - "typescript.tsdk": "node_modules/typescript/lib" -} \ No newline at end of file + "editor.defaultFormatter": "esbenp.prettier-vscode" +} diff --git a/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterShardUpdate.ts b/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterShardUpdate.ts index 4c7ea5cc5a..1eaa450928 100644 --- a/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterShardUpdate.ts +++ b/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterShardUpdate.ts @@ -54,6 +54,7 @@ export async function generateRedisClusterShardUpdateCloneData( clusterType: currentClusterInfo.cluster_spec.spec_cluster_type, clusterTypeName: currentClusterInfo.cluster_type_name, currentShardNum: currentClusterInfo.cluster_shard_num, + groupNum: currentClusterInfo.machine_pair_cnt, currentSpecId: currentClusterInfo.cluster_spec.spec_id, dbVersion: item.db_version, specConfig: { @@ -66,10 +67,6 @@ export async function generateRedisClusterShardUpdateCloneData( id: currentClusterInfo.proxy[0].spec_config.id, count: new Set(currentClusterInfo.proxy.map((item) => item.ip)).size, }, - backendGroup: { - id: currentClusterInfo.cluster_spec.spec_id, - count: currentClusterInfo.redis_master.length, - }, }; }); return { diff --git a/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterTypeUpdate.ts b/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterTypeUpdate.ts index 0e2b02470c..b50d95c8a9 100644 --- a/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterTypeUpdate.ts +++ b/dbm-ui/frontend/src/hooks/useTicketCloneInfo/generateCloneData/redis/clusterTypeUpdate.ts @@ -53,6 +53,7 @@ export async function generateRedisClusterTypeUpdateCloneData(ticketData: Ticket currentSepc: `${currentClusterInfo.cluster_capacity}G_${currentClusterInfo.cluster_spec.qps.max}/s${t('(n 分片)', { n: currentClusterInfo.cluster_shard_num })}`, targetClusterType: item.target_cluster_type, currentShardNum: currentClusterInfo.cluster_shard_num, + groupNum: currentClusterInfo.machine_pair_cnt, clusterTypeName: currentClusterInfo.cluster_type_name, currentSpecId: currentClusterInfo.cluster_spec.spec_id, dbVersion: item.db_version, @@ -66,10 +67,6 @@ export async function generateRedisClusterTypeUpdateCloneData(ticketData: Ticket id: currentClusterInfo.proxy[0].spec_config.id, count: new Set(currentClusterInfo.proxy.map((item) => item.ip)).size, }, - backendGroup: { - id: currentClusterInfo.cluster_spec.spec_id, - count: currentClusterInfo.redis_master.length, - }, }; }); return { diff --git a/dbm-ui/frontend/src/views/db-manage/redis/capacity-change/pages/page1/components/ClusterDeployPlan.vue b/dbm-ui/frontend/src/views/db-manage/redis/capacity-change/pages/page1/components/ClusterDeployPlan.vue index c9c217456a..b43ea304b9 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/capacity-change/pages/page1/components/ClusterDeployPlan.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/capacity-change/pages/page1/components/ClusterDeployPlan.vue @@ -186,6 +186,7 @@
{{ t('集群部署方案') }}