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

B #5327: Fix attribute deletion when update secgroup (#1089)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2021-04-12 14:12:15 +02:00 committed by Ruben S. Montero
parent e44f79a092
commit e7baf0c3fa
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -267,7 +267,6 @@ define(function(require) {
}
function _submitWizard(context) {
var name = WizardFields.retrieveInput($('#security_group_name', context));
var description = WizardFields.retrieveInput($('#security_group_description', context));
@ -291,12 +290,15 @@ define(function(require) {
Sunstone.runAction("SecurityGroup.create",security_group_json);
return false;
} else if (this.action == "update") {
delete security_group_json["NAME"];
var update_json = $.extend({},this.element.TEMPLATE,security_group_json)
delete update_json["NAME"];
Sunstone.runAction(
"SecurityGroup.update",
this.resourceId,
TemplateUtils.templateToString(security_group_json));
TemplateUtils.templateToString(update_json));
return false;
}
@ -320,6 +322,7 @@ define(function(require) {
}
function _fill(context, element) {
this.element = element;
var that = this;
this.setHeader(element);