Skip to content

Commit ac04a9f

Browse files
author
Jessica Wang
committed
CLOUDSTACK-4793: UI > Infrastructure > Virtual Routers > detail tab > add Version field which will include text "Requires Upgrade" if VR version is different from MS version.
1 parent c61d2ee commit ac04a9f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7688,6 +7688,9 @@
76887688
state: {
76897689
label: 'label.state'
76907690
},
7691+
version: {
7692+
label: 'label.version'
7693+
},
76917694
guestnetworkid: {
76927695
label: 'label.network.id'
76937696
},
@@ -7736,7 +7739,7 @@
77367739
dataType: 'json',
77377740
async: true,
77387741
success: function(json) {
7739-
var jsonObj = json.listroutersresponse.router[0];
7742+
var jsonObj = json.listroutersresponse.router[0];
77407743
addExtraPropertiesToRouterInstanceObject(jsonObj);
77417744
args.response.success({
77427745
actionFilter: routerActionfilter,
@@ -16435,10 +16438,18 @@
1643516438
}
1643616439

1643716440
var addExtraPropertiesToRouterInstanceObject = function(jsonObj) {
16438-
if (jsonObj.isredundantrouter == true)
16441+
if (jsonObj.isredundantrouter == true) {
1643916442
jsonObj["redundantRouterState"] = jsonObj.redundantstate;
16440-
else
16443+
} else {
1644116444
jsonObj["redundantRouterState"] = "";
16445+
}
16446+
16447+
//jsonObj.version = '4.2.0-SNAPSHOT'; //for testing only
16448+
if (jsonObj.version != undefined && jsonObj.version.length > 0) {
16449+
if (jsonObj.version != g_cloudstackversion) { //if VirtualRouter version is different from management server version
16450+
jsonObj.version += " (Requires Upgrade)";
16451+
}
16452+
}
1644216453
}
1644316454

1644416455
var refreshNspData = function(nspName) {

0 commit comments

Comments
 (0)