1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

B #4273: Fix labels when update service (#4349)

This commit is contained in:
Sergio Betanzos 2020-03-11 18:31:39 +01:00 committed by GitHub
parent 2161d5e6d1
commit 1c98510723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,6 +269,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;