1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Feature #3786: Add keep on disk option for vCenter in Sunstone

This commit is contained in:
Tino Vazquez 2015-09-01 13:45:23 +02:00
parent 45a6ecd80e
commit 1b57182f4c
2 changed files with 19 additions and 0 deletions

View File

@ -106,6 +106,8 @@ define(function(require) {
'TYPE': 'vcenter',
'VM_TEMPLATE': $("#vcenter_template_uuid", context).val()
}
templateJSON["KEEP_DISKS_ON_DONE"] = $("#KEEP_DISKS", context).is(':checked')?"YES":"NO"
}
if ($('#sunstone_capacity_select:checked', context).length > 0) {
@ -132,6 +134,12 @@ define(function(require) {
delete templateJSON["SUNSTONE_NETWORK_SELECT"]
}
if (templateJSON["HYPERVISOR"] == 'vcenter' &&
templateJSON["KEEP_DISKS_ON_DONE"].toLowerCase() == "yes" ) {
$("#KEEP_DISKS", context).attr("checked", "checked");
delete templateJSON["KEEP_DISKS_ON_DONE"]
}
if (templateJSON["HYPERVISOR"]) {
$("input[name='hypervisor'][value='"+templateJSON["HYPERVISOR"]+"']", context).trigger("click")
delete templateJSON["HYPERVISOR"];

View File

@ -52,6 +52,17 @@
</label>
<input type="text" id="vcenter_template_uuid" name="name"/>
</div>
<div class="large-6 columns">
<div class="row">
<div class="large-6 columns">
<input type="checkbox" id="KEEP_DISKS" name="KEEP_DISKS"/>
<label for="KEEP_DISKS">
{{tr "Keep VM disks"}}
{{{tip (tr "If selected, VM disks won't be deleted after the VM finishes its lifecycle.")}}}
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-7 columns">