Skip to content

Commit

Permalink
Merge pull request #5785 from easy-mj/feature/mj-r-master-4667_2
Browse files Browse the repository at this point in the history
feat(4667): 调整VMware设置插槽内核数
  • Loading branch information
easy-mj authored Dec 18, 2023
2 parents b9d80e8 + dd531d5 commit 86a40fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions containers/Compute/sections/CpuRadio/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ export default {
showCpuSocketsInit (v) {
this.showCpuSockets = v
},
cpuSocketsInit (v) {
this.cpuSockets = v
},
},
methods: {
change (e) {
Expand Down
17 changes: 15 additions & 2 deletions containers/Compute/views/disk/mixins/columns.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PREALLOCATION_OPTION_MAP } from '@Compute/constants'
import {
getNameDescriptionTableColumn,
getBrandTableColumn,
Expand All @@ -15,7 +16,7 @@ import i18n from '@/locales'
import {
getUnusedTableColumn,
getStorageTypeTableColumn,
getPreallocationTableColumn,
// getPreallocationTableColumn,
} from '../utils/columns'
import { MEDIUM_MAP } from '../../../constants'

Expand Down Expand Up @@ -54,14 +55,26 @@ 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 [
<div class={'d-flex'}>
<span>{sizestr(row.disk_size, 'M', 1024)}</span>
<span class={'text-color-help'}>({ preallocation })</span>
</div>,
]
},
},
formatter: ({ row }) => {
return sizestr(row.disk_size, 'M', 1024)
},
hidden: () => {
return this.$isScopedPolicyMenuHidden('disk_hidden_columns.disk_size')
},
},
getPreallocationTableColumn(),
// getPreallocationTableColumn(),
{
field: 'iops',
title: i18n.t('compute.max_iops'),
Expand Down
2 changes: 1 addition & 1 deletion containers/Compute/views/vminstance/sidepage/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 86a40fc

Please sign in to comment.