You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2013/11/08 16:17:59 UTC
git commit: updated refs/heads/4.2 to 20fd5dc
Updated Branches:
refs/heads/4.2 934f1d9aa -> 20fd5dc84
CLOUDSTACK-4923: add missing Network limits in Domain details page
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20fd5dc8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20fd5dc8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20fd5dc8
Branch: refs/heads/4.2
Commit: 20fd5dc84f0c7e0d639991ca1a8baffffd9538a6
Parents: 934f1d9
Author: Wei Zhou <w....@leaseweb.com>
Authored: Fri Nov 8 16:17:53 2013 +0100
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Fri Nov 8 16:17:53 2013 +0100
----------------------------------------------------------------------
ui/scripts/domains.js | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20fd5dc8/ui/scripts/domains.js
----------------------------------------------------------------------
diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js
index 7306a38..5d8fd68 100644
--- a/ui/scripts/domains.js
+++ b/ui/scripts/domains.js
@@ -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;