incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: refs/heads/ui-multiple-nics - Pass vmguestip to add PF rules API
Date Fri, 08 Mar 2013 00:22:02 GMT
Pass vmguestip to add PF rules API


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

Branch: refs/heads/ui-multiple-nics
Commit: f6d91904322b0255796c16cdefa0f6a02aa1256a
Parents: be8e427
Author: Brian Federle <brian.federle@citrix.com>
Authored: Thu Mar 7 15:56:01 2013 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Thu Mar 7 15:56:01 2013 -0800

----------------------------------------------------------------------
 ui/scripts/network.js              |    4 ++++
 ui/scripts/ui/widgets/multiEdit.js |   12 +++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f6d91904/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 6cb7cf0..cec7a64 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -3099,6 +3099,10 @@
                           openfirewall: false
                         };
 
+                        if (args.itemData[0]._subselect) {
+                          data.vmguestip = args.itemData[0]._subselect;
+                        }
+
                         if('vpc' in args.context) { //from VPC section
                           if(args.data.tier == null) {
                             args.response.error('Tier is required');

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f6d91904/ui/scripts/ui/widgets/multiEdit.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/multiEdit.js b/ui/scripts/ui/widgets/multiEdit.js
index 2480f56..0a05591 100755
--- a/ui/scripts/ui/widgets/multiEdit.js
+++ b/ui/scripts/ui/widgets/multiEdit.js
@@ -489,7 +489,17 @@
 
                   // Attach VM data to row
                   function(elem) {
-                    return $(elem).data('json-obj');
+                    var itemData = $(elem).data('json-obj');
+                    var $subselect = $(elem).find('.subselect select');
+
+                    // Include subselect data
+                    if ($subselect && $subselect.val()) {
+                      return $.extend(itemData, {
+                        _subselect: $subselect.val()
+                      });
+                    }
+                    
+                    return itemData;
                   }
                 ));
                 $dataList.remove();


Mime
View raw message