1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

B #4169: Fix clusters in VNet templates (#4182)

This commit is contained in:
Sergio Betanzos 2020-02-12 18:36:20 +01:00 committed by GitHub
parent 6e21acba9f
commit 8024aa2c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -364,7 +364,7 @@ define(function(require) {
var clusters = this.clustersTable.retrieveResourceTableSelect();
if (clusters != undefined && clusters.length != 0) {
network_json["CLUSTERS"] = clusters.join(",");
network_json["CLUSTERS_IDS"] = clusters.join(",");
}
$.extend(network_json, CustomTagsTable.retrieve($("#vntemplateCreateContextTab", context)));
@ -395,16 +395,15 @@ define(function(require) {
}
function _submitAdvanced(context) {
var template = $("textarea#template", context).val();
if (this.action == "create") {
var template = $("textarea#template", context).val();
var vntemplate_json = {vntemplate: {vntemplate_raw: template}};
var vntemplate_json = {vntemplate: { vntemplate_raw: template}};
Sunstone.runAction("VNTemplate.create", vntemplate_json);
return false;
} else if (this.action == "update") {
var template_raw = $("textarea#template", context).val();
var vntemplate_json = {vntemplate: {vntemplate_raw: template}};
Sunstone.runAction("VNTemplate.update", this.resourceId, vntemplate_json);
Sunstone.runAction("VNTemplate.update", this.resourceId, template);
return false;
}
}

View File

@ -58,7 +58,7 @@ define(function(require){
var clusters = [];
if (this.element.TEMPLATE.CLUSTERS != undefined){
clusters = this.element.TEMPLATE.CLUSTERS.split(",");
clusters = this.element.TEMPLATE.CLUSTERS_IDS.split(",");
if (!$.isArray(clusters)){
clusters = [clusters];