mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
This commit is contained in:
parent
991795bcc4
commit
ad2b8d7579
@ -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
|
||||
|
||||
@ -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"/>',
|
||||
|
||||
@ -289,30 +289,7 @@
|
||||
},
|
||||
|
||||
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);
|
||||
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;
|
||||
@ -2802,7 +2786,7 @@
|
||||
},
|
||||
|
||||
addPrimaryStorage: function(args) {
|
||||
if(configurationUseLocalStorage == true) { //use local storage, don't need primary storage. So, skip this step.
|
||||
if(args.data.zone.localstorageenabled == 'on') { //use local storage, don't need primary storage. So, skip this step.
|
||||
stepFns.addSecondaryStorage({
|
||||
data: args.data
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user