From d95b883e38a2cee8ca9230b0dbef58ce3b8d6d6c Mon Sep 17 00:00:00 2001 From: Abel Coronado Date: Tue, 12 Jun 2018 15:48:31 +0200 Subject: [PATCH] Disk cost float to string (#2172) --- .../form-panels/create/wizard-tabs/general.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js index 7231b080ac..dd9e471829 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js @@ -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);