1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #5035: Automatic deletion service (#657)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2021-01-18 15:45:50 +01:00 committed by GitHub
parent 01aa245d5a
commit 9977a6f331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 0 deletions

View File

@ -160,6 +160,7 @@ define(function(require) {
$('select[name="deployment"]', context).val(element.TEMPLATE.BODY.deployment);
$("select[name='shutdown_action_service']", context).val(element.TEMPLATE.BODY.shutdown_action);
$("input[name='ready_status_gate']", context).prop("checked",element.TEMPLATE.BODY.ready_status_gate || false);
$("input[name='automatic_deletion']", context).prop("checked",element.TEMPLATE.BODY.automatic_deletion || false);
// Remove role tabs
$("#roles_tabs i.remove-tab", context).trigger("click");

View File

@ -101,6 +101,14 @@
</label>
</div>
</div>
<div class="row">
<div class="service_template_param st_man small-12 columns">
<input type="checkbox" name="automatic_deletion" id="automatic_deletion"/>
<label for="c">
{{tr "Automatic deletion of service when all VMs terminated"}}
</label>
</div>
</div>
{{/advancedSection}}
</div>
<br>

View File

@ -261,6 +261,7 @@ define(function(require) {
var deployment = $('select[name="deployment"]', context).val();
var shutdown_action_service = $('select[name="shutdown_action_service"]', context).val();
var ready_status_gate = $('input[name="ready_status_gate"]', context).prop("checked");
var automatic_deletion = $('input[name="automatic_deletion"]', context).prop("checked");
var custom_attrs = {};
var network_attrs = {};
@ -317,6 +318,8 @@ define(function(require) {
json_template['ready_status_gate'] = ready_status_gate;
json_template['automatic_deletion'] = automatic_deletion;
// add labels
var currentInfo = Sunstone.getElementRightInfo(TAB_ID)
if (
@ -381,6 +384,7 @@ define(function(require) {
$('select[name="deployment"]', context).val(element.TEMPLATE.BODY.deployment);
$("select[name='shutdown_action_service']", context).val(element.TEMPLATE.BODY.shutdown_action);
$("input[name='ready_status_gate']", context).prop("checked",element.TEMPLATE.BODY.ready_status_gate || false);
$("input[name='automatic_deletion']", context).prop("checked",element.TEMPLATE.BODY.automatic_deletion || false);
$(".service_networks i.remove-tab", context).trigger("click");

View File

@ -100,6 +100,14 @@
</label>
</div>
</div>
<div class="row">
<div class="service_template_param st_man small-12 columns">
<input type="checkbox" name="automatic_deletion" id="automatic_deletion"/>
<label for="c">
{{tr "Automatic deletion of service when all VMs terminated"}}
</label>
</div>
</div>
{{/advancedSection}}
<br>
<div class="row">