You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/04/15 23:47:33 UTC
git commit: updated refs/heads/master to e35bec5
Repository: cloudstack
Updated Branches:
refs/heads/master 6d1865495 -> e35bec515
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/e35bec51
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e35bec51
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e35bec51
Branch: refs/heads/master
Commit: e35bec515fd1aca3e3e6e241c1534b40f890ce44
Parents: 6d18654
Author: Brian Federle <br...@citrix.com>
Authored: Tue Apr 15 14:40:05 2014 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Tue Apr 15 14:42:11 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/e35bec51/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 f40ac60..b58f952 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/e35bec51/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/e35bec51/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index c2fa55b..8155204 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/e35bec51/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/e35bec51/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index c4b91d3..9fb6668 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');
}
}