mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4923: add missing Network limits in Domain details page
(cherry picked from commit 20fd5dc84f)
This commit is contained in:
parent
09ca263afd
commit
fdb3b49228
|
|
@ -213,6 +213,17 @@
|
|||
});
|
||||
}
|
||||
|
||||
if (args.data.networkLimit != null) {
|
||||
$.ajax({
|
||||
url: createURL("updateResourceLimit&domainid=" + args.context.domains[0].id + "&resourceType=6&max=" + args.data.networkLimit),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
domainObj["networkLimit"] = args.data.networkLimit;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (args.data.primaryStorageLimit != null) {
|
||||
$.ajax({
|
||||
url: createURL("updateResourceLimit&domainid=" + args.context.domains[0].id + "&resourceType=10&max=" + args.data.primaryStorageLimit),
|
||||
|
|
@ -432,6 +443,15 @@
|
|||
return true;
|
||||
}
|
||||
},
|
||||
networkLimit: {
|
||||
label: 'label.network.limits',
|
||||
isEditable: function(args) {
|
||||
if (args.domains[0].id == g_domainid) //disallow to update the field on the domain you log in as
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
},
|
||||
primaryStorageLimit: {
|
||||
label: 'label.primary.storage.limits',
|
||||
isEditable: function(args) {
|
||||
|
|
@ -560,6 +580,9 @@
|
|||
case "4":
|
||||
domainObj["templateLimit"] = limit.max;
|
||||
break;
|
||||
case "6":
|
||||
domainObj["networkLimit"] = limit.max;
|
||||
break;
|
||||
case "7":
|
||||
domainObj["vpcLimit"] = limit.max;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue