mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-12 09:17:41 +03:00
Disk cost float to string (#2172)
This commit is contained in:
parent
644770c017
commit
2eed5a7251
@ -295,10 +295,10 @@ define(function(require) {
|
||||
$.extend(true, templateJSON, CapacityCreate.retrieve($("div.capacityCreate", context)));
|
||||
|
||||
if (templateJSON['MEMORY_COST'] && templateJSON['MEMORY_UNIT_COST'] && templateJSON['MEMORY_UNIT_COST'] == "GB") {
|
||||
templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST']/1024;
|
||||
templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST'] / 1024;
|
||||
}
|
||||
if (templateJSON['DISK_COST']) {
|
||||
templateJSON['DISK_COST'] = templateJSON['DISK_COST']/1024;
|
||||
templateJSON['DISK_COST'] = (templateJSON['DISK_COST'] / 1024).toString();
|
||||
}
|
||||
|
||||
var as_uid = this.usersTable.retrieveResourceTableSelect();
|
||||
@ -316,10 +316,10 @@ define(function(require) {
|
||||
function _fill(context, templateJSON) {
|
||||
|
||||
if (templateJSON['MEMORY_COST'] && templateJSON['MEMORY_UNIT_COST'] && templateJSON['MEMORY_UNIT_COST'] == "GB") {
|
||||
templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST']*1024;
|
||||
templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST'] * 1024;
|
||||
}
|
||||
if (templateJSON['DISK_COST']) {
|
||||
templateJSON['DISK_COST'] = templateJSON['DISK_COST']*1024;
|
||||
templateJSON['DISK_COST'] = templateJSON['DISK_COST'] * 1024;
|
||||
}
|
||||
|
||||
that.templateDISKS = $.extend(true, {}, templateJSON.DISK);
|
||||
|
Loading…
Reference in New Issue
Block a user