From 1b8a63a24d0b019e0146b28f02ef8be37fa89249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Thu, 7 Nov 2024 12:50:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8C=BA=E5=88=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webs/cms-web/src/services/monitor/index.js | 5 ++ webs/cms-web/src/services/platform/index.js | 8 +++ .../src/views/compute/cloud/platform.vue | 66 ++++++++++++++++--- webs/cms-web/src/views/compute/vm.vue | 50 +++++++++++--- 4 files changed, 112 insertions(+), 17 deletions(-) diff --git a/webs/cms-web/src/services/monitor/index.js b/webs/cms-web/src/services/monitor/index.js index 7632a9a..abe0264 100644 --- a/webs/cms-web/src/services/monitor/index.js +++ b/webs/cms-web/src/services/monitor/index.js @@ -151,6 +151,11 @@ export function getVms(params) { params: params }) } +export function getVmsByDc(params) { + return request.get('/cms/v1/vms/listByDataCenter', { + params: params + }) +} export function getDataStore(params) { return request.get('/cms/v1/datastores', { diff --git a/webs/cms-web/src/services/platform/index.js b/webs/cms-web/src/services/platform/index.js index dc9563e..1fca3f1 100644 --- a/webs/cms-web/src/services/platform/index.js +++ b/webs/cms-web/src/services/platform/index.js @@ -60,3 +60,11 @@ export function detailVolume(type, id) { export function getResourceList() { return request.get('/cms/v1/monitor/resourcetype', { params: { rows: 99, page: 1 } }) } + +// 数据中心 +const dcUrl = 'cmp/v1/dcs' +export function getDc(params) { + return request.get(dcUrl, { + params + }) +} diff --git a/webs/cms-web/src/views/compute/cloud/platform.vue b/webs/cms-web/src/views/compute/cloud/platform.vue index 98b299d..f606d5e 100644 --- a/webs/cms-web/src/views/compute/cloud/platform.vue +++ b/webs/cms-web/src/views/compute/cloud/platform.vue @@ -1,6 +1,20 @@ diff --git a/webs/cms-web/src/views/compute/vm.vue b/webs/cms-web/src/views/compute/vm.vue index 306dbe8..16231b1 100644 --- a/webs/cms-web/src/views/compute/vm.vue +++ b/webs/cms-web/src/views/compute/vm.vue @@ -10,22 +10,27 @@ - + - + - + - + + + + + + @@ -165,10 +170,10 @@