mirror of https://github.com/rancher/ui.git
Merge pull request #2754 from loganhz/vshpere
Fix vSphere node template size display issue
This commit is contained in:
commit
dbeadfa192
|
|
@ -7,6 +7,7 @@ import ManageLabels from 'shared/mixins/manage-labels';
|
|||
import { addAction } from 'ui/utils/add-view-action';
|
||||
import { get, set, computed, setProperties } from '@ember/object';
|
||||
import { ucFirst } from 'shared/utils/util';
|
||||
import { formatSi } from 'shared/utils/parse-unit';
|
||||
import C from 'ui/utils/constants';
|
||||
|
||||
// Map of driverName -> [string | function]
|
||||
|
|
@ -38,7 +39,9 @@ const DISPLAY_SIZES = {
|
|||
rackspace: 'config.flavorId',
|
||||
|
||||
vmwarevsphere() {
|
||||
return `${ get(this, 'config.memorySize') } GiB, ${ get(this, 'config.cpuCount') } Core`;
|
||||
const size = formatSi(get(this, 'config.memorySize') * 1048576, 1024, 'iB');
|
||||
|
||||
return `${ size }, ${ get(this, 'config.cpuCount') } Core`;
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue