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 2012/08/23 20:11:14 UTC
[1/2] git commit: CS-16144: Show warning before enabling local
storage in zone wizard
Updated Branches:
refs/heads/master b5d00724f -> b302ed904
CS-16144: Show warning before enabling local storage in zone wizard
Conflicts:
ui/dictionary.jsp
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b302ed90
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b302ed90
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b302ed90
Branch: refs/heads/master
Commit: b302ed904a13ea82b04f159889e9cf094ac5db62
Parents: 7e3b440
Author: Brian Federle <br...@citrix.com>
Authored: Thu Aug 23 11:06:00 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Aug 23 11:08:48 2012 -0700
----------------------------------------------------------------------
.../WEB-INF/classes/resources/messages.properties | 1 +
ui/dictionary.jsp | 1 +
ui/scripts/zoneWizard.js | 21 ++++++++++++++-
3 files changed, 22 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b302ed90/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 a05eb81..f96a7c4 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.zoneWizard.enable.local.storage=WARNING: If you enable local storage for this zone, you must do the following, depending on where you would like your system VMs to launch:<br/><br/>1. If system VMs need to be launched in primary storage, primary storage needs to be added to the zone after creation. You must also start the zone in a disabled state.<br/><br/>2. If system VMs need to be launched in local storage, system.vm.use.local.storage needs to be set to true before you enable the zone.<br/><br/><br/>Would you like to continue?
label.local.storage.enabled=Local storage enabled
label.tier.details=Tier details
label.edit.tags=Edit tags
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b302ed90/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index b3e6970..fffd461 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -7,6 +7,7 @@
<% long now = System.currentTimeMillis(); %>
<script language="javascript">
dictionary = {
+'message.zoneWizard.enable.local.storage': '<fmt:message key="message.zoneWizard.enable.local.storage"/>',
'label.edit.tags': '<fmt:message key="label.edit.tags"/>',
'label.local.storage.enabled': '<fmt:message key="label.local.storage.enabled"/>',
'label.tier.details': '<fmt:message key="label.tier.details"/>',
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b302ed90/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 8877497..8414048 100644
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -497,7 +497,26 @@
},
localstorageenabled: {
label: 'label.local.storage.enabled',
- isBoolean: true
+ isBoolean: true,
+ onChange: function(args) {
+ var $checkbox = args.$checkbox;
+
+ if ($checkbox.is(':checked')) {
+ cloudStack.dialog.confirm({
+ message: 'message.zoneWizard.enable.local.storage',
+ action: function() {
+ $checkbox.attr('checked', true);
+ },
+ cancelAction: function() {
+ $checkbox.attr('checked', false);
+ }
+ });
+
+ return false;
+ }
+
+ return true;
+ }
}
}
},