cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 794ee69
Date Tue, 07 Oct 2014 21:21:33 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e2ca6e38d -> 794ee6929


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.


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

Branch: refs/heads/master
Commit: 794ee6929d078fd919842f2c1f55156f133d7934
Parents: e2ca6e3
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Oct 7 14:20:59 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Oct 7 14:21:22 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/794ee692/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