diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 420cb7b2de4..e52f51998fd 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -522,6 +522,9 @@ memory: { label: 'label.memory.mb', converter: function(args) { + if (args == undefined) + return ''; + else return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, @@ -1038,6 +1041,9 @@ memory: { label: 'label.memory.mb', converter: function(args) { + if (args == undefined) + return ''; + else return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 2a159675f31..9fa70e3bda4 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -900,6 +900,9 @@ var roleTypeDomainAdmin = "2"; cloudStack.converters = { convertBytes: function(bytes) { + if (bytes == undefined) + return ''; + if (bytes < 1024 * 1024) { return (bytes / 1024).toFixed(2) + " KB"; } else if (bytes < 1024 * 1024 * 1024) {