diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 6adbade76b0..869b876865c 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -522,7 +522,10 @@ memory: { label: 'label.memory.mb', converter: function(args) { - return cloudStack.converters.convertBytes(args * 1024 * 1024); + if (args == undefined) + return ''; + else + return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, networkrate: { @@ -1038,7 +1041,10 @@ memory: { label: 'label.memory.mb', converter: function(args) { - return cloudStack.converters.convertBytes(args * 1024 * 1024); + if (args == undefined) + return ''; + else + return cloudStack.converters.convertBytes(args * 1024 * 1024); } }, networkrate: { 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) {