mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-25 23:21:29 +03:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
parent
1cd286d4c8
commit
936df07fbd
@ -322,9 +322,15 @@ define(function(require) {
|
||||
function _retrieve(context) {
|
||||
var templateJSON = {};
|
||||
var osJSON = {};
|
||||
$.extend(osJSON, WizardFields.retrieve(".bootTab", context));
|
||||
$.extend(osJSON, WizardFields.retrieve(".kernelTab", context));
|
||||
$.extend(osJSON, WizardFields.retrieve(".ramdiskTab", context));
|
||||
$.extend(osJSON, WizardFields.retrieve(
|
||||
$(".bootTab", context)
|
||||
));
|
||||
$.extend(osJSON, WizardFields.retrieve(
|
||||
$(".kernelTab", context)
|
||||
));
|
||||
$.extend(osJSON, WizardFields.retrieve(
|
||||
$(".ramdiskTab", context)
|
||||
));
|
||||
|
||||
var boot = _retrieveBootValue(context);
|
||||
|
||||
@ -334,13 +340,24 @@ define(function(require) {
|
||||
osJSON["BOOT"] = "";
|
||||
}
|
||||
|
||||
if (!$.isEmptyObject(osJSON)) { templateJSON["OS"] = osJSON; };
|
||||
if (!$.isEmptyObject(osJSON)) {
|
||||
templateJSON["OS"] = osJSON;
|
||||
}
|
||||
|
||||
var featuresJSON = WizardFields.retrieve(".featuresTab", context);
|
||||
if (!$.isEmptyObject(featuresJSON)) { templateJSON["FEATURES"] = featuresJSON; };
|
||||
var featuresJSON = WizardFields.retrieve(
|
||||
$(".featuresTab", context)
|
||||
);
|
||||
if (!$.isEmptyObject(featuresJSON)) {
|
||||
templateJSON["FEATURES"] = featuresJSON;
|
||||
}
|
||||
|
||||
var cpuModelJSON = WizardFields.retrieve(".cpuTab", context);
|
||||
if (!$.isEmptyObject(cpuModelJSON)) { templateJSON["CPU_MODEL"] = cpuModelJSON; };
|
||||
var cpuModelJSON = WizardFields.retrieve(
|
||||
$(".cpuTab", context)
|
||||
);
|
||||
|
||||
if (!$.isEmptyObject(cpuModelJSON)) {
|
||||
templateJSON["CPU_MODEL"] = cpuModelJSON;
|
||||
}
|
||||
|
||||
return templateJSON;
|
||||
}
|
||||
|
@ -127,12 +127,18 @@ define(function(require) {
|
||||
});
|
||||
}
|
||||
|
||||
function _submitWizard(context) {
|
||||
var templateJSON = {}
|
||||
function _submitWizard() {
|
||||
var context = ".sunstone-content > #vms-tab #vms-tab-wizardForms.is-active";
|
||||
var templateJSON = {};
|
||||
$.each(this.wizardTabs, function(index, wizardTab) {
|
||||
$.extend(true, templateJSON, wizardTab.retrieve($('#' + wizardTab.wizardTabId, context)));
|
||||
$.extend(
|
||||
true,
|
||||
templateJSON,
|
||||
wizardTab.retrieve(
|
||||
$('#' + wizardTab.wizardTabId, context)
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
Sunstone.runAction("VM.updateconf", this.resourceId, TemplateUtils.templateToString(templateJSON));
|
||||
return false;
|
||||
|
||||
|
@ -35,13 +35,13 @@ define(function(require) {
|
||||
|
||||
fields.each(function() {
|
||||
var field = $(this);
|
||||
|
||||
if (field.prop('wizard_field_disabled') != true &&
|
||||
field.val() != null && field.val().length &&
|
||||
(field.attr("type") != "checkbox" || field.prop("checked")) &&
|
||||
(field.attr("type") != "radio" || field.prop("checked"))) {
|
||||
if(
|
||||
field.prop('wizard_field_disabled') != true &&
|
||||
field.val() != null && field.val().length &&
|
||||
(field.attr("type") != "checkbox" || field.prop("checked")) &&
|
||||
(field.attr("type") != "radio" || field.prop("checked"))
|
||||
) {
|
||||
var field_name = field.attr('wizard_field');
|
||||
|
||||
if (field.attr('wizard_field_64') == "true"){
|
||||
templateJSON[field_name] = btoa(field.val());
|
||||
} else {
|
||||
@ -49,7 +49,6 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return templateJSON;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user