From ca205ae63def44d71d9bafb23b8be2e76c84b9a1 Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Wed, 11 Mar 2020 18:31:39 +0100 Subject: [PATCH] B #4273: Fix labels when update service (#4349) (cherry picked from commit 1c98510723616f6a183291d99019c2fab1ad81f6) --- .../tabs/oneflow-templates-tab/form-panels/create.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 524c6134c5..feb0ac2833 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 @@ -230,6 +230,17 @@ define(function(require) { json_template['ready_status_gate'] = ready_status_gate; + // add labels + var currentInfo = Sunstone.getElementRightInfo(TAB_ID) + if ( + currentInfo && + currentInfo.TEMPLATE && + currentInfo.TEMPLATE.BODY && + currentInfo.TEMPLATE.BODY.labels + ) { + json_template['labels'] = currentInfo.TEMPLATE.BODY.labels + } + if (this.action == "create") { Sunstone.runAction("ServiceTemplate.create", json_template ); return false;