mirror of https://github.com/apache/cloudstack.git
CS-16599: cloudstack UI - guest network page - fix a bug that networkdomain didn't show in a shared network.
This commit is contained in:
parent
b101dc7279
commit
29dda3f41a
|
|
@ -956,7 +956,8 @@
|
|||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listnetworksresponse.network[0];
|
||||
var jsonObj = json.listnetworksresponse.network[0];
|
||||
addExtraPropertiesToGuestNetworkObject(jsonObj);
|
||||
args.response.success(
|
||||
{
|
||||
actionFilter: cloudStack.actionFilter.guestNetwork,
|
||||
|
|
|
|||
|
|
@ -454,6 +454,29 @@ function listViewDataProvider(args, data) {
|
|||
});
|
||||
}
|
||||
|
||||
//used by infrastruct page and network page
|
||||
var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {
|
||||
jsonObj.networkdomaintext = jsonObj.networkdomain;
|
||||
jsonObj.networkofferingidText = jsonObj.networkofferingid;
|
||||
|
||||
if(jsonObj.acltype == "Domain") {
|
||||
if(jsonObj.domainid == rootAccountId)
|
||||
jsonObj.scope = "All";
|
||||
else
|
||||
jsonObj.scope = "Domain (" + jsonObj.domain + ")";
|
||||
}
|
||||
else if (jsonObj.acltype == "Account"){
|
||||
if(jsonObj.project != null)
|
||||
jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.project + ")";
|
||||
else
|
||||
jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.account + ")";
|
||||
}
|
||||
|
||||
if(jsonObj.vlan == null && jsonObj.broadcasturi != null) {
|
||||
jsonObj.vlan = jsonObj.broadcasturi.replace("vlan://", "");
|
||||
}
|
||||
}
|
||||
|
||||
//find service object in network object
|
||||
function ipFindNetworkServiceByName(pName, networkObj) {
|
||||
if(networkObj == null)
|
||||
|
|
|
|||
|
|
@ -10406,28 +10406,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
var addExtraPropertiesToGuestNetworkObject = function(jsonObj) {
|
||||
jsonObj.networkdomaintext = jsonObj.networkdomain;
|
||||
jsonObj.networkofferingidText = jsonObj.networkofferingid;
|
||||
|
||||
if(jsonObj.acltype == "Domain") {
|
||||
if(jsonObj.domainid == rootAccountId)
|
||||
jsonObj.scope = "All";
|
||||
else
|
||||
jsonObj.scope = "Domain (" + jsonObj.domain + ")";
|
||||
}
|
||||
else if (jsonObj.acltype == "Account"){
|
||||
if(jsonObj.project != null)
|
||||
jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.project + ")";
|
||||
else
|
||||
jsonObj.scope = "Account (" + jsonObj.domain + ", " + jsonObj.account + ")";
|
||||
}
|
||||
|
||||
if(jsonObj.vlan == null && jsonObj.broadcasturi != null) {
|
||||
jsonObj.vlan = jsonObj.broadcasturi.replace("vlan://", "");
|
||||
}
|
||||
}
|
||||
|
||||
var addExtraPropertiesToRouterInstanceObject = function(jsonObj) {
|
||||
if(jsonObj.isredundantrouter == true)
|
||||
jsonObj["redundantRouterState"] = jsonObj.redundantstate;
|
||||
|
|
|
|||
Loading…
Reference in New Issue