cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/4.4 to 3263822
Date Tue, 15 Apr 2014 21:48:21 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 47208dc23 -> 3263822bf


CLOUDSTACK-6342: UI changes for secondary IP on LB rules

This is front-end only; API call changes still need to be done.


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

Branch: refs/heads/4.4
Commit: 3263822bf4e64745681d535d7c1315120ddbbe62
Parents: 47208dc
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Apr 15 14:40:05 2014 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Apr 15 14:48:03 2014 -0700

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  2 ++
 ui/css/cloudstack3.css                          | 35 +++++++++++++++-----
 ui/dictionary.jsp                               |  2 ++
 ui/scripts/network.js                           | 10 ++++--
 ui/scripts/ui/widgets/listView.js               | 13 ++++++--
 5 files changed, 50 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3263822b/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 8abe874..bfa9600 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+message.listView.subselect.multi=(Ctrl/Cmd-click)
+label.use.vm.ips=Use VM IPs
 label.reinstall.vm=Reinstall VM
 message.reinstall.vm=NOTE: Proceed with caution. This will cause the VM to be reinstalled
from the template; data on the root disk will be lost. Extra data volumes, if any, will not
be touched.
 label.recover.vm=Recover VM

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3263822b/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 6602c16..c0f7c00 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -1333,7 +1333,7 @@ div.list-view td.first {
   cursor: pointer;
 }
 
-div.list-view td.first:hover {
+div.list-view tr:not(.multi-edit-selected) td.first:hover {
   color: #3A82CD;
 }
 
@@ -1978,6 +1978,11 @@ div.copypasteicon:hover {
   margin: 4px 0 0 12px;
 }
 
+.list-view .subselect span.info {
+  font-size: 10px;
+  white-space: nowrap;
+}
+
 .list-view .subselect select {
   width: 85%;
   margin: 5px 0 4px;
@@ -7939,23 +7944,37 @@ div.panel.ui-dialog div.list-view div.fixed-header {
 
 /*List-view: subselect dropdown*/
 .list-view .subselect {
-  width: 116px;
+  width: 102px;
+  cursor: default;
   display: block;
   float: left;
-  background: url(../images/bg-gradients.png) 0px -42px;
+  background: #EFEFEF;
   padding: 0;
   margin: 8px 0 1px 7px;
   clear: both;
   border: 1px solid #A8A7A7;
-  /*+border-radius:4px;*/
-  -moz-border-radius: 4px;
-  -webkit-border-radius: 4px;
-  -khtml-border-radius: 4px;
-  border-radius: 4px;
+  /*+border-radius:2px;*/
+  -moz-border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -khtml-border-radius: 2px;
+  border-radius: 2px;
+}
+
+.list-view .subselect:hover span {
+  color: initial;
 }
 
 .list-view .subselect span {
   margin: 4px 0 0 12px;
+  cursor: default;
+}
+
+.list-view .subselect span.info {
+  background: none;
+}
+
+.list-view .subselect span:hover {
+  color: initial;
 }
 
 .list-view .subselect select {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3263822b/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index ebe71b6..f4d380c 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,8 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script type="text/javascript">
 dictionary = {
+'message.listView.subselect.multi': '<fmt:message key="message.listView.subselect.multi"
/>',
+'label.use.vm.ips': '<fmt:message key="label.use.vm.ips" />',
 'label.recover.vm': '<fmt:message key="label.recover.vm" />',
 'message.recover.vm': '<fmt:message key="message.recover.vm" />',
 'label.reinstall.vm': '<fmt:message key="label.reinstall.vm" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3263822b/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 0276684..6494704 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -3324,7 +3324,8 @@
                                                 
                                                 //when server-side change of adding new parameter
"vmidipmap" to assignToLoadBalancerRule API is in, uncomment the following commented 4 lines.

                                                 subselect: {
-                                                    label: 'label.use.vm.ip',
+                                                    isMultiple: true,
+                                                    label: 'label.use.vm.ips',
                                                     dataProvider: multipleVmSecondaryIPSubselect
                                                    
                                                 },
                                                                                         
       
@@ -3617,7 +3618,12 @@
                                                         	if (args.itemData != null) {
                                                         		for (var k = 0; k < args.itemData.length;
k++) {                                                          			
                                                         			inputData['vmidipmap[' + k + '].vmid']
= args.itemData[k].id;
-                                                        			inputData['vmidipmap[' + k + '].vmip']
= args.itemData[k]._subselect;  
+
+                                                              // NOTE - multiple IP support
not ready for API integration yet
+                                                              // for now, just use the first
selected IP
+                                                              //
+                                                              // Please change this to pass
multiple IPs
+                                                              inputData['vmidipmap[' + k
+ '].vmip'] = args.itemData[k]._subselect[0]; 
                                                         		}
                                                         	}                              
                         	
                                                         }  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3263822b/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 2a663a1..e0a294c 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -1285,11 +1285,19 @@
             if (subselect) {
                 var $td = $tr.find('td.first');
                 var $select = $('<div></div>').addClass('subselect').append(
-                    $('<span>').html(_l(subselect.label)),
-                    $('<select>')
+                    $('<span>').html(_l(subselect.label))
                 ).hide();
                 var $selectionArea = $tr.find('td:last').find('input');
 
+                if (subselect.isMultiple) {
+                    $select.append(
+                        $('<select multiple>'),
+                        $('<span>').addClass('info').html(_l('message.listView.subselect.multi'))
+                    );
+                } else {
+                  $select.append($('<select>'));
+                }
+
                 $td.append($select);
 
                 // Show and populate selection
@@ -1317,6 +1325,7 @@
                                         $select.hide();
                                     }
 
+                                    $select.find('option:first').attr('selected', 'selected');

                                     $listView.find('.data-table').dataTable('refresh');
                                 }
                             }


Mime
View raw message