From 125404509315bc00d35535dd6e96f5a1af5854bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Mon, 9 Sep 2024 18:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=20fix:=20=E9=9B=86=E7=BE=A4=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2/=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webs/cmp-web/src/filters/resource.js | 44 ++-- .../ctstack/page/container/cluster.vue | 192 ++++++------------ .../ctstack/page/container/detail.vue | 4 +- .../ctstack/page/container/service/index.vue | 92 --------- .../views/resource/ctstack/services/tke.js | 8 +- 5 files changed, 96 insertions(+), 244 deletions(-) delete mode 100644 webs/cmp-web/src/views/resource/ctstack/page/container/service/index.vue diff --git a/webs/cmp-web/src/filters/resource.js b/webs/cmp-web/src/filters/resource.js index 608fde3..22ea40c 100644 --- a/webs/cmp-web/src/filters/resource.js +++ b/webs/cmp-web/src/filters/resource.js @@ -2501,26 +2501,42 @@ export function policyColor(value) { return obj[value] || 'danger' } -export function tceClusterColor(value) { +export function ctstackClusterColor(value) { const obj = { - Running: 'success', - Creating: 'warning', - Abnormal: 'danger', - Failed: 'danger', - Initializing: 'warning', - enabled: 'success', - disabled: 'danger' + normal: 'success', + creating: 'warning', + create_fail: 'danger', + adjust: 'warning', + updating: 'warning', + suspend: 'warning', + deleting: 'warning', + deleted: 'success', + delete_fail: 'danger', + resetting: 'warning', + resettled: 'success', + reset_fail: 'danger', + upgrading: 'warning', + upgrade_fail: 'danger' } return obj[value] } -export function tceClusterText(value) { +export function ctstackClusterText(value) { const obj = { - Running: '运行中', - Creating: '创建中', - Abnormal: '异常', - Failed: '失败', - Initializing: '创建中' + normal: '正常', + creating: '创建中', + create_fail: '创建失败', + adjust: '规模调整中', + updating: '升级中', + suspend: '暂停', + deleting: '删除中', + deleted: '已删除', + delete_fail: '删除失败', + resetting: '节点重置中', + resettled: '节点已重置', + reset_fail: '节点重置失败', + upgrading: '集群升级中', + upgrade_fail: '集群升级失败' } return obj[value] } diff --git a/webs/cmp-web/src/views/resource/ctstack/page/container/cluster.vue b/webs/cmp-web/src/views/resource/ctstack/page/container/cluster.vue index c9786bb..feb87c9 100644 --- a/webs/cmp-web/src/views/resource/ctstack/page/container/cluster.vue +++ b/webs/cmp-web/src/views/resource/ctstack/page/container/cluster.vue @@ -1,6 +1,6 @@ - - - diff --git a/webs/cmp-web/src/views/resource/ctstack/page/container/detail.vue b/webs/cmp-web/src/views/resource/ctstack/page/container/detail.vue index fc218f2..94b177a 100644 --- a/webs/cmp-web/src/views/resource/ctstack/page/container/detail.vue +++ b/webs/cmp-web/src/views/resource/ctstack/page/container/detail.vue @@ -64,8 +64,8 @@ diff --git a/webs/cmp-web/src/views/resource/ctstack/services/tke.js b/webs/cmp-web/src/views/resource/ctstack/services/tke.js index 206c9c1..ae9b946 100644 --- a/webs/cmp-web/src/views/resource/ctstack/services/tke.js +++ b/webs/cmp-web/src/views/resource/ctstack/services/tke.js @@ -139,12 +139,8 @@ export function modifyInstance({ id, newName }) { } // 集群 删除 -export function deleteCluster(params, mode) { - const formData = new FormData() - formData.append('mode', mode) - return request.delete(`${clusterListUrl}/${params.id}`, { - data: formData - }) +export function deleteCluster(params) { + return request.delete(`${clusterListUrl}/${params.id}`) } // 容器服务 日志列表