cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke4...@apache.org
Subject [32/50] [abbrv] git commit: updated refs/heads/4.5 to 50ee981
Date Mon, 13 Oct 2014 04:41:49 GMT
CLOUDSTACK-4987: UI > Instances > detailView > NICs tab > Add network to VM >
Network dropdown => (1) For root-admin, populate networks of all accounts. (2) For regular-user/domain-admin,
populate only networks belonging to this VM owner.

(cherry picked from commit 794ee6929d078fd919842f2c1f55156f133d7934)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9714ecbd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9714ecbd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9714ecbd

Branch: refs/heads/4.5
Commit: 9714ecbde890d4bf1e17660b1b26c843547521c8
Parents: a516e5d
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Oct 7 14:20:59 2014 -0700
Committer: David Nalley <david@gnsa.us>
Committed: Mon Oct 13 00:34:22 2014 -0400

----------------------------------------------------------------------
 ui/scripts/instances.js | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9714ecbd/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 46df52d..a15fcd9 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1945,13 +1945,22 @@
                                         networkid: {
                                             label: 'label.network',
                                             select: function(args) {
+                                            	var data1 = {
+                                            		zoneid: args.context.instances[0].zoneid	
+                                            	};
+                                            	if (isAdmin()) {
+                                            		$.extend(data1, {
+                                            			listAll: true
+                                            		});
+                                            	} else {
+                                            		$.extend(data1, {
+                                            			account: args.context.instances[0].account,
+                                                        domainid: args.context.instances[0].domainid
+                                            		});
+                                            	}     
                                                 $.ajax({
                                                     url: createURL('listNetworks'),
-                                                    data: {
-                                                        zoneid: args.context.instances[0].zoneid,
-                                                        account: args.context.instances[0].account,
-                                                        domainid: args.context.instances[0].domainid
-                                                    },
+                                                    data: data1,
                                                     success: function(json) {
                                                         args.response.success({
                                                             data: $.map(json.listnetworksresponse.network,
function(network) {


Mime
View raw message