diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/form-panels/update/html.hbs b/src/sunstone/public/app/tabs/oneflow-services-tab/form-panels/update/html.hbs
index 03ff1da021..ad393b1fbb 100644
--- a/src/sunstone/public/app/tabs/oneflow-services-tab/form-panels/update/html.hbs
+++ b/src/sunstone/public/app/tabs/oneflow-services-tab/form-panels/update/html.hbs
@@ -104,7 +104,7 @@
diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js
index 4a75613f8a..051f8027a7 100644
--- a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js
+++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create.js
@@ -299,7 +299,9 @@ define(function(require) {
name: name,
deployment: deployment,
description: description,
- roles: roles
+ roles: roles,
+ ready_status_gate: ready_status_gate,
+ automatic_deletion: automatic_deletion
};
//add networks in post body
@@ -316,10 +318,6 @@ define(function(require) {
json_template['shutdown_action'] = shutdown_action_service;
}
- json_template['ready_status_gate'] = ready_status_gate;
-
- json_template['automatic_deletion'] = automatic_deletion;
-
// add labels
var currentInfo = Sunstone.getElementRightInfo(TAB_ID)
if (
@@ -331,11 +329,15 @@ define(function(require) {
json_template['labels'] = currentInfo.TEMPLATE.BODY.labels
}
+ var new_template = {};
+ $.extend(true, new_template, that.old_template, json_template);
+
if (this.action == "create") {
- Sunstone.runAction("ServiceTemplate.create", json_template );
+ Sunstone.runAction("ServiceTemplate.create", new_template );
return false;
} else if (this.action == "update") {
- Sunstone.runAction("ServiceTemplate.update",this.resourceId, JSON.stringify(json_template));
+ var templateStr = JSON.stringify(new_template);
+ Sunstone.runAction("ServiceTemplate.update", this.resourceId, templateStr);
return false;
}
}
@@ -371,6 +373,7 @@ define(function(require) {
if (this.action != "update") {return;}
this.setHeader(element);
this.resourceId = element.ID;
+ this.old_template = element.TEMPLATE.BODY;
// Populates the Avanced mode Tab
$('#template', context).val(JSON.stringify(element.TEMPLATE.BODY, null, " "));
diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create/wizard.hbs b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create/wizard.hbs
index b3849b8ab7..de3352fae0 100644
--- a/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create/wizard.hbs
+++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/form-panels/create/wizard.hbs
@@ -103,7 +103,7 @@
-
diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs
index 19a44110b7..30b93f2b82 100644
--- a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs
+++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs
@@ -57,6 +57,16 @@
{{/if}}
+
+ {{tr "Automatic Deletion"}} |
+
+ {{#if element.TEMPLATE.BODY.automatic_deletion}}
+ {{tr "yes"}}
+ {{else}}
+ {{tr "no"}}
+ {{/if}}
+ |
+
{{#if customAttrs}}