1
0
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:
Abel Coronado 2018-06-12 15:48:31 +02:00 committed by Ruben S. Montero
parent 644770c017
commit 2eed5a7251

View File

@ -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);