CS-16144: Show warning before enabling local storage in zone wizard

Conflicts:
	ui/dictionary.jsp
This commit is contained in:
Brian Federle 2012-08-23 11:06:00 -07:00
parent 7e3b4408cb
commit b302ed904a
3 changed files with 22 additions and 1 deletions

View File

@ -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

View File

@ -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"/>',

View File

@ -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;
}
}
}
},