cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [23/100] [abbrv] git commit: Network list view: Fix incorrect 'acquire new ip' message from appearing
Date Thu, 06 Dec 2012 08:09:10 GMT
Network list view: Fix incorrect 'acquire new ip' message from appearing

Fixes issue where global flag was sometimes causing the confirm
message to be incorrect for non-VPC acquire IP action.

Conflicts:
	ui/scripts/network.js


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

Branch: refs/heads/events-framework
Commit: 70a5a22329b2b7bacca124547c8f307be7a89d25
Parents: 4562021
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Nov 13 10:39:45 2012 -0800
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Nov 13 10:52:32 2012 -0800

----------------------------------------------------------------------
 .../WEB-INF/classes/resources/messages.properties  |    1 +
 ui/dictionary.jsp                                  |    1 +
 ui/scripts/network.js                              |    8 +++-----
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/70a5a223/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 3c88763..626e44a 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -17,6 +17,7 @@
 
 
 #new labels (begin) **********************************************************************************************
+message.acquire.new.ip.vpc=Please confirm that you would like to acquire a new IP for this
VPC.
 label.zoneWizard.trafficType.management=Mangement: Traffic between CloudStack\'s internal
resources, including any components that communicate with the Management Server, such as hosts
and CloudStack system VMs
 label.zoneWizard.trafficType.public=Public: Traffic between the internet and virtual machines
in the cloud.
 label.zoneWizard.trafficType.guest=Guest: Traffic between end-user virtual machines

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/70a5a223/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index bf53ed9..b80e296 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,7 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'message.acquire.new.ip.vpc': '<fmt:message key="message.acquire.new.ip.vpc"/>',
 'label.quickview': '<fmt:message key="label.quickview"/>',
 'label.migrate.to.host': '<fmt:message key="label.migrate.to.host"/>',
 'label.migrate.to.storage': '<fmt:message key="label.migrate.to.storage"/>',

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/70a5a223/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 026c1a7..bf7095e 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1209,20 +1209,18 @@
               preFilter: function(args) {
 							  if('networks' in args.context) { //from Guest Network section
 									if(args.context.networks[0].vpcid == null) { //if it's a non-VPC network, show Acquire
IP button
-								        checkVpc=0;
-                                                                 	return true;
-                                                                       }
+                    return true;
+                  }
 									else //if it's a VPC network, hide Acquire IP button
 										return false;
 								}
 								else { //from VPC section
-                                                                  checkVpc=1;
 								  return true; //show Acquire IP button
 								}
               },							
               messages: {   
                 confirm: function(args) {
-                  if(checkVpc == 1)
+                  if(args.context.vpc)
                     return 'Please confirm that you would like to acquire a new IP for this
VPC';
                    else
                     return 'message.acquire.new.ip';


Mime
View raw message