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

B #5254: Fix Service Update (#862)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2021-02-23 13:40:31 +01:00 committed by GitHub
parent a8c391fd89
commit b10d2cc986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -445,14 +445,14 @@ define(function(require) {
json_template["labels"] = currentInfo.TEMPLATE.BODY.labels;
}
var new_template = {};
$.extend(true, new_template, that.old_template, json_template);
json_template['registration_time'] = that.old_template.registration_time;
clear();
if (this.action == "create") {
Sunstone.runAction("ServiceTemplate.create", new_template );
Sunstone.runAction("ServiceTemplate.create", json_template );
return false;
} else if (this.action == "update") {
var templateStr = JSON.stringify(new_template);
var templateStr = JSON.stringify(json_template);
Sunstone.runAction("ServiceTemplate.update", this.resourceId, templateStr);
return false;
}