mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
parent
6e21acba9f
commit
8024aa2c1c
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user