Skip to content

Commit fdb3b49

Browse files
committed
CLOUDSTACK-4923: add missing Network limits in Domain details page
(cherry picked from commit 20fd5dc)
1 parent 09ca263 commit fdb3b49

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

ui/scripts/domains.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@
213213
});
214214
}
215215

216+
if (args.data.networkLimit != null) {
217+
$.ajax({
218+
url: createURL("updateResourceLimit&domainid=" + args.context.domains[0].id + "&resourceType=6&max=" + args.data.networkLimit),
219+
dataType: "json",
220+
async: false,
221+
success: function(json) {
222+
domainObj["networkLimit"] = args.data.networkLimit;
223+
}
224+
});
225+
}
226+
216227
if (args.data.primaryStorageLimit != null) {
217228
$.ajax({
218229
url: createURL("updateResourceLimit&domainid=" + args.context.domains[0].id + "&resourceType=10&max=" + args.data.primaryStorageLimit),
@@ -432,6 +443,15 @@
432443
return true;
433444
}
434445
},
446+
networkLimit: {
447+
label: 'label.network.limits',
448+
isEditable: function(args) {
449+
if (args.domains[0].id == g_domainid) //disallow to update the field on the domain you log in as
450+
return false;
451+
else
452+
return true;
453+
}
454+
},
435455
primaryStorageLimit: {
436456
label: 'label.primary.storage.limits',
437457
isEditable: function(args) {
@@ -560,6 +580,9 @@
560580
case "4":
561581
domainObj["templateLimit"] = limit.max;
562582
break;
583+
case "6":
584+
domainObj["networkLimit"] = limit.max;
585+
break;
563586
case "7":
564587
domainObj["vpcLimit"] = limit.max;
565588
break;

0 commit comments

Comments
 (0)