Skip to content

Commit b302ed9

Browse files
committed
CS-16144: Show warning before enabling local storage in zone wizard
Conflicts: ui/dictionary.jsp
1 parent 7e3b440 commit b302ed9

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎client/WEB-INF/classes/resources/messages.properties‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818

1919
#new labels (begin) **********************************************************************************************
20+
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?
2021
label.local.storage.enabled=Local storage enabled
2122
label.tier.details=Tier details
2223
label.edit.tags=Edit tags

‎ui/dictionary.jsp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<% long now = System.currentTimeMillis(); %>
88
<script language="javascript">
99
dictionary = {
10+
'message.zoneWizard.enable.local.storage': '<fmt:message key="message.zoneWizard.enable.local.storage"/>',
1011
'label.edit.tags': '<fmt:message key="label.edit.tags"/>',
1112
'label.local.storage.enabled': '<fmt:message key="label.local.storage.enabled"/>',
1213
'label.tier.details': '<fmt:message key="label.tier.details"/>',

‎ui/scripts/zoneWizard.js‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,26 @@
497497
},
498498
localstorageenabled: {
499499
label: 'label.local.storage.enabled',
500-
isBoolean: true
500+
isBoolean: true,
501+
onChange: function(args) {
502+
var $checkbox = args.$checkbox;
503+
504+
if ($checkbox.is(':checked')) {
505+
cloudStack.dialog.confirm({
506+
message: 'message.zoneWizard.enable.local.storage',
507+
action: function() {
508+
$checkbox.attr('checked', true);
509+
},
510+
cancelAction: function() {
511+
$checkbox.attr('checked', false);
512+
}
513+
});
514+
515+
return false;
516+
}
517+
518+
return true;
519+
}
501520
}
502521
}
503522
},

0 commit comments

Comments
 (0)