Updated Branches: refs/heads/master 6d7674982 -> 691666562
CLOUDSTACK-4793: UI > Infrastructure > Virtual Routers > detail tab > add Requires Upgrade field to reflect new parameter requiresupgrade in API response. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/69166656 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/69166656 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/69166656 Branch: refs/heads/master Commit: 6916665623135e88f34ff1f8797cf5391911e3cd Parents: 6d76749 Author: Jessica Wang <[email protected]> Authored: Wed Nov 6 16:29:33 2013 -0800 Committer: Jessica Wang <[email protected]> Committed: Wed Nov 6 16:30:02 2013 -0800 ---------------------------------------------------------------------- ui/scripts/sharedFunctions.js | 15 ++++++++++----- ui/scripts/system.js | 13 +++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69166656/ui/scripts/sharedFunctions.js ---------------------------------------------------------------------- diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index fddbd70..40440df 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -924,11 +924,16 @@ cloudStack.converters = { } return localDate; }, - toBooleanText: function(booleanValue) { - if (booleanValue == true) - return "Yes"; - - return "No"; + toBooleanText: function(booleanValue) { + var text1; + if (booleanValue == true) { + text1 = "Yes"; + } else if (booleanValue == false) { + text1 = "No"; + } else { //booleanValue == undefined + text1 = ""; + } + return text1; }, convertHz: function(hz) { if (hz == null) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69166656/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index fd6a136..e568a6d 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7973,6 +7973,10 @@ version: { label: 'label.version' }, + requiresupgrade: { + label: 'Requires Upgrade', + converter: cloudStack.converters.toBooleanText + }, guestnetworkid: { label: 'label.network.id' }, @@ -17013,14 +17017,7 @@ jsonObj["redundantRouterState"] = jsonObj.redundantstate; } else { jsonObj["redundantRouterState"] = ""; - } - - //jsonObj.version = '4.2.0-SNAPSHOT'; //for testing only - if (jsonObj.version != undefined && jsonObj.version.length > 0) { - if (jsonObj.version != g_cloudstackversion) { //if VirtualRouter version is different from management server version - jsonObj.version += " (Requires Upgrade)"; - } - } + } } var refreshNspData = function(nspName) {
