Merge pull request #2754 from loganhz/vshpere

Fix vSphere node template size display issue
This commit is contained in:
Westly Wright 2019-03-13 09:32:33 -07:00 committed by GitHub
commit dbeadfa192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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`;
},
}