From ed7405897f7a533ef166b229a59221661e5a679a Mon Sep 17 00:00:00 2001 From: chenshihai Date: Tue, 30 Aug 2022 09:59:01 +0800 Subject: [PATCH 1/2] update resources management --- web_src/vuepages/langs/config/en-US.js | 7 ++++- web_src/vuepages/langs/config/zh-CN.js | 5 ++++ .../resources/components/SpecificationDialog.vue | 9 ++++-- .../pages/resources/specification/index.vue | 33 ++++++++++++++++++++-- 4 files changed, 48 insertions(+), 6 deletions(-) diff --git a/web_src/vuepages/langs/config/en-US.js b/web_src/vuepages/langs/config/en-US.js index c25b66b5a..d12c848a3 100644 --- a/web_src/vuepages/langs/config/en-US.js +++ b/web_src/vuepages/langs/config/en-US.js @@ -131,6 +131,7 @@ const en = { onShelfConfirm: 'Are you sure to on shelf the resources specification?', offShelfConfirm: 'Are you sure to off shelf the resources specification?', onShelfCode1001: 'On shelf failed, the resources queues not available.', + onShelfCode1003: 'On shelf failed, the resources specification not available.', offShelfDlgTip1: 'The resources specification has already used in scene:', offShelfDlgTip2: 'Please confirm to off shelf?', resSceneManagement: 'Resources Scene Management', @@ -149,7 +150,11 @@ const en = { computeCluster: 'Compute Cluster', resourceSpecification: 'Resource Specification', lastUpdateTime: 'Last Update Time', - resSceneDeleteConfirm: 'Are you sure to delete the current Resource Scene?', + resSceneDeleteConfirm: 'Are you sure to delete the current Resource Scene?', + resourceSpecificationIsAvailable: 'Specification Is Available', + resourceSpecificationIsAvailableAll: 'Specification Is Available(All)', + available: 'Available', + notAvailable: 'Not Available', }, } diff --git a/web_src/vuepages/langs/config/zh-CN.js b/web_src/vuepages/langs/config/zh-CN.js index c593cd684..4dd5566c0 100644 --- a/web_src/vuepages/langs/config/zh-CN.js +++ b/web_src/vuepages/langs/config/zh-CN.js @@ -131,6 +131,7 @@ const zh = { onShelfConfirm: '请确认上架该规格?', offShelfConfirm: '请确认下架该规格?', onShelfCode1001: '上架失败,资源池(队列)不可用。', + onShelfCode1003: '上架失败,资源规格不可用。', offShelfDlgTip1: '当前资源规格已在以下场景中使用:', offShelfDlgTip2: '请确认进行下架操作?', resSceneManagement: '算力资源应用场景管理', @@ -150,6 +151,10 @@ const zh = { resourceSpecification: '资源规格', lastUpdateTime: '最后更新时间', resSceneDeleteConfirm: '是否确认删除当前应用场景?', + resourceSpecificationIsAvailable: '资源规格是否可用', + resourceSpecificationIsAvailableAll: '资源规格是否可用(全部)', + available: '可用', + notAvailable: '不可用', }, } diff --git a/web_src/vuepages/pages/resources/components/SpecificationDialog.vue b/web_src/vuepages/pages/resources/components/SpecificationDialog.vue index ec0732e0b..418682ec0 100644 --- a/web_src/vuepages/pages/resources/components/SpecificationDialog.vue +++ b/web_src/vuepages/pages/resources/components/SpecificationDialog.vue @@ -20,8 +20,8 @@ {{ $t('resourcesManagement.sourceSpecCode') }}
- +
@@ -245,6 +245,11 @@ export default { type: 'info', message: this.$t('resourcesManagement.onShelfCode1001') }); + } else if (action === 'on-shelf' && res.Code === 1003) { + this.$message({ + type: 'info', + message: this.$t('resourcesManagement.onShelfCode1003') + }); } else { this.$message({ type: 'error', diff --git a/web_src/vuepages/pages/resources/specification/index.vue b/web_src/vuepages/pages/resources/specification/index.vue index 2335e67b8..58d95d74f 100644 --- a/web_src/vuepages/pages/resources/specification/index.vue +++ b/web_src/vuepages/pages/resources/specification/index.vue @@ -9,6 +9,9 @@ + + +
@@ -19,7 +22,7 @@
- + @@ -49,6 +52,14 @@ {{ scope.row.UnitPrice }} + + +