From dd531d54ce06800b0961c19d85bb148ece3469dd Mon Sep 17 00:00:00 2001 From: easy-mj Date: Mon, 18 Dec 2023 11:56:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(4667):=20=E8=B0=83=E6=95=B4VMware=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=8F=92=E6=A7=BD=E5=86=85=E6=A0=B8=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- containers/Compute/sections/CpuRadio/index.vue | 3 +++ containers/Compute/views/disk/mixins/columns.js | 17 +++++++++++++++-- .../views/vminstance/sidepage/Detail.vue | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/containers/Compute/sections/CpuRadio/index.vue b/containers/Compute/sections/CpuRadio/index.vue index 504360260c..f088881d5f 100644 --- a/containers/Compute/sections/CpuRadio/index.vue +++ b/containers/Compute/sections/CpuRadio/index.vue @@ -109,6 +109,9 @@ export default { showCpuSocketsInit (v) { this.showCpuSockets = v }, + cpuSocketsInit (v) { + this.cpuSockets = v + }, }, methods: { change (e) { diff --git a/containers/Compute/views/disk/mixins/columns.js b/containers/Compute/views/disk/mixins/columns.js index f0353d0053..dcb2919aaf 100644 --- a/containers/Compute/views/disk/mixins/columns.js +++ b/containers/Compute/views/disk/mixins/columns.js @@ -1,3 +1,4 @@ +import { PREALLOCATION_OPTION_MAP } from '@Compute/constants' import { getNameDescriptionTableColumn, getBrandTableColumn, @@ -15,7 +16,7 @@ import i18n from '@/locales' import { getUnusedTableColumn, getStorageTypeTableColumn, - getPreallocationTableColumn, + // getPreallocationTableColumn, } from '../utils/columns' import { MEDIUM_MAP } from '../../../constants' @@ -54,6 +55,18 @@ export default { title: i18n.t('table.title.disk_size'), sortable: true, minWidth: 50, + slots: { + default: ({ row }, h) => { + const preallocation = PREALLOCATION_OPTION_MAP[row.preallocation]?.label + + return [ +
+ {sizestr(row.disk_size, 'M', 1024)} + ({ preallocation }) +
, + ] + }, + }, formatter: ({ row }) => { return sizestr(row.disk_size, 'M', 1024) }, @@ -61,7 +74,7 @@ export default { return this.$isScopedPolicyMenuHidden('disk_hidden_columns.disk_size') }, }, - getPreallocationTableColumn(), + // getPreallocationTableColumn(), { field: 'iops', title: i18n.t('compute.max_iops'), diff --git a/containers/Compute/views/vminstance/sidepage/Detail.vue b/containers/Compute/views/vminstance/sidepage/Detail.vue index 77d6a19f7c..4095dbd656 100644 --- a/containers/Compute/views/vminstance/sidepage/Detail.vue +++ b/containers/Compute/views/vminstance/sidepage/Detail.vue @@ -356,7 +356,7 @@ export default { field: 'vcpu_count', title: 'CPU', formatter: ({ row }) => { - if (row.cpu_sockets) { + if (row.hypervisor === HYPERVISORS_MAP.esxi.key && row.cpu_sockets) { return `CPU: ${row.vcpu_count}${this.$t('compute.text_167')}(${this.$t('compute.slots_number')}:${row.cpu_sockets})` } return row.vcpu_count + this.$t('compute.text_167')