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/20 20:37:02 UTC
git commit: CS-16044: Zone wizard: Add 'use local storage' checkbox
Updated Branches:
refs/heads/master 991795bcc -> ad2b8d757
CS-16044: Zone wizard: Add 'use local storage' checkbox
Add checkbox to zone wizard indicating whether zone will use local
storage. If checked, bypass add primary storage step and enable local
storage for zone on creation.
Conflicts:
ui/index.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/ad2b8d75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ad2b8d75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ad2b8d75
Branch: refs/heads/master
Commit: ad2b8d7579a254705812a694e952a0f89e537f41
Parents: 991795b
Author: Brian Federle <br...@citrix.com>
Authored: Mon Aug 20 11:07:06 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Aug 20 11:36:57 2012 -0700
----------------------------------------------------------------------
.../WEB-INF/classes/resources/messages.properties | 1 +
ui/index.jsp | 1 +
ui/scripts/zoneWizard.js | 38 ++++----------
3 files changed, 13 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ad2b8d75/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 cbb8974..272be07 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -17,6 +17,7 @@
#new labels (begin) **********************************************************************************************
+label.local.storage.enabled=Local storage enabled
label.tier.details=Tier details
label.edit.tags=Edit tags
label.action.enable.physical.network=Enable physical network
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ad2b8d75/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 68513b7..2a41ee9 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1635,6 +1635,7 @@ under the License.
<script language="javascript">
dictionary = {
'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"/>',
'label.action.enable.physical.network': '<fmt:message key="label.action.enable.physical.network"/>',
'label.action.disable.physical.network': '<fmt:message key="label.action.disable.physical.network"/>',
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ad2b8d75/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 79ef423..3083c84 100644
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -288,31 +288,8 @@
return (args.groupedData.zone.hypervisor != "VMware");
},
- addPrimaryStorage: function(args) {
- var item;
- $.ajax({
- url: createURL("listConfigurations&name=" + todb("use.local.storage")),
- dataType: 'json',
- async: false,
- success: function(json) {
- var items = json.listconfigurationsresponse.configuration; //unfortunately, it returns 2 items("system.vm.use.local.storage", "use.local.storage") instead of 1 item.
- if(items != null && items.length > 0) {
- for(var i = 0; i < items.length; i++) {
- item = items[i];
- if(item.name == "use.local.storage") {
- break; //break for loop
- }
- }
- }
- }
- });
-
- if(item == null || item.value == null || item.value.length == 0 || item.value == "false")
- configurationUseLocalStorage = false;
- else
- configurationUseLocalStorage = true;
-
- return (!configurationUseLocalStorage);
+ addPrimaryStorage: function(args) {
+ return args.data.localstorageenabled != 'on';
}
},
@@ -517,6 +494,10 @@
}
});
}
+ },
+ localstorageenabled: {
+ label: 'label.local.storage.enabled',
+ isBoolean: true
}
}
},
@@ -1262,6 +1243,9 @@
array1.push("&name=" + todb(args.data.zone.name));
+ if (args.data.zone.localstorageenabled == 'on') {
+ array1.push("&localstorageenabled=true");
+ }
array1.push("&dns1=" + todb(args.data.zone.dns1));
var dns2 = args.data.zone.dns2;
@@ -2801,8 +2785,8 @@
});
},
- addPrimaryStorage: function(args) {
- if(configurationUseLocalStorage == true) { //use local storage, don't need primary storage. So, skip this step.
+ addPrimaryStorage: function(args) {
+ if(args.data.zone.localstorageenabled == 'on') { //use local storage, don't need primary storage. So, skip this step.
stepFns.addSecondaryStorage({
data: args.data
});