mirror of https://github.com/apache/cloudstack.git
CS-16493: cloudstack UI - IP Address page - hide VLAN for regular-user/domain-admin.
This commit is contained in:
parent
318a60fd6a
commit
08b074a101
|
|
@ -1727,25 +1727,27 @@
|
|||
tabs: {
|
||||
details: {
|
||||
title: 'label.details',
|
||||
|
||||
preFilter: function(args) {
|
||||
var hiddenFields = [];
|
||||
var zoneObj;
|
||||
$.ajax({
|
||||
url: createURL("listZones&id=" + args.context.ipAddresses[0].zoneid),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
zoneObj = json.listzonesresponse.zone[0];
|
||||
}
|
||||
});
|
||||
if(zoneObj.networktype == "Advanced") {
|
||||
hiddenFields.push("issystem");
|
||||
hiddenFields.push("purpose");
|
||||
}
|
||||
return hiddenFields;
|
||||
},
|
||||
|
||||
preFilter: function(args) {
|
||||
var hiddenFields = [];
|
||||
var zoneObj;
|
||||
$.ajax({
|
||||
url: createURL("listZones&id=" + args.context.ipAddresses[0].zoneid),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
zoneObj = json.listzonesresponse.zone[0];
|
||||
}
|
||||
});
|
||||
if(zoneObj.networktype == "Advanced") {
|
||||
hiddenFields.push("issystem");
|
||||
hiddenFields.push("purpose");
|
||||
}
|
||||
|
||||
if(!isAdmin()) {
|
||||
hiddenFields.push("vlanname");
|
||||
}
|
||||
return hiddenFields;
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
ipaddress: { label: 'label.ip' }
|
||||
|
|
|
|||
Loading…
Reference in New Issue