diff --git a/src/sunstone/public/app/opennebula/host.js b/src/sunstone/public/app/opennebula/host.js
index 6ed00e3d60..13ebf437ca 100644
--- a/src/sunstone/public/app/opennebula/host.js
+++ b/src/sunstone/public/app/opennebula/host.js
@@ -15,10 +15,10 @@
/* -------------------------------------------------------------------------- */
define(function(require) {
- var OpenNebulaAction = require('./action');
- var Locale = require('utils/locale');
- var OpenNebulaError = require('./error');
- var OpenNebulaHelper = require('./helper');
+ var OpenNebulaAction = require("./action");
+ var Locale = require("utils/locale");
+ var OpenNebulaError = require("./error");
+ var OpenNebulaHelper = require("./helper");
var infrastructureCache;
@@ -26,7 +26,6 @@ define(function(require) {
var pcisCallbacks = [];
var customizationsCallbacks = [];
var kvmInfoCallbacks = [];
- var lxdProfilesInfoCallbacks = [];
var CACHE_EXPIRE = 300000; //ms
@@ -171,24 +170,6 @@ define(function(require) {
_infrastructure();
},
- "lxdProfilesInfo": function(params){
- var callback = params.success;
- var callbackError = params.error;
- var request = OpenNebulaHelper.request(RESOURCE, "infrastructure");
-
- if (infrastructureCache &&
- infrastructureCache["timestamp"] + CACHE_EXPIRE > new Date().getTime()) {
-
- return callback ? callback(request, infrastructureCache["lxd_profiles"]) : null;
- }
-
- lxdProfilesInfoCallbacks.push({
- success : callback,
- error : callbackError
- });
-
- _infrastructure();
- },
"kvmInfo": function(params){
var callback = params.success;
var callbackError = params.error;
@@ -244,16 +225,6 @@ define(function(require) {
customizations = [customizations];
}
- var lxd_profiles = response.lxd_profiles;
-
- if (lxd_profiles == undefined){
- lxd_profiles = [];
- }
-
- if (!Array.isArray(lxd_profiles)){ // If only 1 convert to array
- lxd_profiles = [lxd_profiles];
- }
-
var kvm_info = response.kvm_info;
if (kvm_info == undefined){
@@ -268,8 +239,7 @@ define(function(require) {
timestamp : new Date().getTime(),
pcis : pcis,
customizations : customizations,
- kvm_info : kvm_info,
- lxd_profiles : lxd_profiles
+ kvm_info : kvm_info
};
infrastructureWaiting = false;
@@ -304,17 +274,6 @@ define(function(require) {
kvmInfoCallbacks = [];
-
- for (var i = 0; i < lxdProfilesInfoCallbacks.length; i++) {
- var callback = lxdProfilesInfoCallbacks[i].success;
-
- if (callback) {
- callback(request, lxd_profiles);
- }
- }
-
- lxdProfilesInfoCallbacks = [];
-
return;
},
error: function(response) {
@@ -346,4 +305,4 @@ define(function(require) {
}
return Host;
-})
+});
diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js
index c37cb912d0..eea7f3ea78 100644
--- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js
+++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js
@@ -19,45 +19,45 @@ define(function(require) {
DEPENDENCIES
*/
- var Locale = require('utils/locale');
- var Tips = require('utils/tips');
- var CapacityCreate = require('./general/capacity-create');
- var WizardFields = require('utils/wizard-fields');
- var Config = require('sunstone-config');
- var UserInputs = require('utils/user-inputs');
- var UniqueId = require('utils/unique-id');
- var OpenNebula = require('opennebula');
+ var Locale = require("utils/locale");
+ var Tips = require("utils/tips");
+ var CapacityCreate = require("./general/capacity-create");
+ var WizardFields = require("utils/wizard-fields");
+ var Config = require("sunstone-config");
+ var UserInputs = require("utils/user-inputs");
+ var UniqueId = require("utils/unique-id");
+ var OpenNebula = require("opennebula");
var UsersTable = require("tabs/users-tab/datatable");
var GroupTable = require("tabs/groups-tab/datatable");
var OpenNebulaHost = require("opennebula/host");
var CoresPerSocket = require("tabs/templates-tab/form-panels/create/wizard-tabs/utils/cores-per-socket");
- var OpenNebulaMarketplace = require('opennebula/marketplace');
- var Notifier = require('utils/notifier');
+ var OpenNebulaMarketplace = require("opennebula/marketplace");
+ var Notifier = require("utils/notifier");
/*
TEMPLATES
*/
- var TemplateHTML = require('hbs!./general/html');
+ var TemplateHTML = require("hbs!./general/html");
/*
CONSTANTS
*/
- var WIZARD_TAB_ID = require('./general/wizardTabId');
- var VCPU_SELECTOR = '#VCPU';
+ var WIZARD_TAB_ID = require("./general/wizardTabId");
+ var VCPU_SELECTOR = "#VCPU";
/*
CONSTRUCTOR
*/
function WizardTab(opts) {
- if (!Config.isTemplateCreationTabEnabled(opts.tabId, 'general')) {
+ if (!Config.isTemplateCreationTabEnabled(opts.tabId, "general")) {
throw "Wizard Tab not enabled";
}
this.wizardTabId = WIZARD_TAB_ID + UniqueId.id();
- this.icon = 'fa-laptop';
+ this.icon = "fa-laptop";
this.title = Locale.tr("General");
if (opts.listener != undefined){
@@ -90,24 +90,24 @@ define(function(require) {
function _html() {
return TemplateHTML({
- 'capacityCreateHTML': CapacityCreate.html(),
- 'logos': Config.vmLogos,
- 'usersDatatable': this.usersTable.dataTableHTML,
- 'groupDatatable': this.groupTable.dataTableHTML,
+ "capacityCreateHTML": CapacityCreate.html(),
+ "logos": Config.vmLogos,
+ "usersDatatable": this.usersTable.dataTableHTML,
+ "groupDatatable": this.groupTable.dataTableHTML,
});
}
function _onShow(context, panelForm) {
- if (panelForm.action == 'create') {
- $('#NAME', context)
- .removeAttr('disabled')
+ if (panelForm.action == "create") {
+ $("#NAME", context)
+ .removeAttr("disabled")
.attr("required", "")
- .prop('wizard_field_disabled', false);
- } else if (panelForm.action == 'update') {
- $('#NAME', context)
+ .prop("wizard_field_disabled", false);
+ } else if (panelForm.action == "update") {
+ $("#NAME", context)
.attr("disabled", "disabled")
.removeAttr("required")
- .prop('wizard_field_disabled', true);
+ .prop("wizard_field_disabled", true);
}
if (panelForm.resource == "VirtualRouterTemplate"){
@@ -136,7 +136,7 @@ define(function(require) {
this.groupTable.initialize();
this.groupTable.refreshResourceTableSelect();
- $(document).on('click', "[href='#" + this.wizardTabId + "']", function(){
+ $(document).on("click", "[href='#" + this.wizardTabId + "']", function(){
//context.foundation('slider', 'reflow');
});
@@ -153,7 +153,7 @@ define(function(require) {
});
context.on("change", "#DISK_COST", function() {
- that.disk = parseFloat(document.getElementById('DISK_COST').value);
+ that.disk = parseFloat(document.getElementById("DISK_COST").value);
if(!isNaN(that.disk)){
that.templateDISKS = JSON.parse(localStorage.getItem("disksJSON"));
if (that.templateDISKS){
@@ -175,25 +175,25 @@ define(function(require) {
var totalCostDisk = 0;
if (!isNaN(totalGB)){
totalCostDisk = totalGB * that.disk;
- document.getElementById('total_value_disk').textContent = convertCostNumber(totalCostDisk * 24 * 30);
+ document.getElementById("total_value_disk").textContent = convertCostNumber(totalCostDisk * 24 * 30);
CapacityCreate.totalCost();
} else {
- document.getElementById('total_value_disk').textContent = totalCostDisk;
+ document.getElementById("total_value_disk").textContent = totalCostDisk;
}
$(".total_disk_cost", context).show();
}
});
}
} else {
- document.getElementById('total_value_disk').textContent = 0;
+ document.getElementById("total_value_disk").textContent = 0;
}
});
context.on("change", "#LOGO", function() {
$("#template_create_logo", context).show();
- $("#template_create_logo", context).html('' +
- '' +
- '');
+ $("#template_create_logo", context).html("" +
+ "
" +
+ "");
});
context.on("change", "input[name='hypervisor']", function() {
@@ -202,41 +202,41 @@ define(function(require) {
$("#vcenter_instance_id", context).attr("required", "");
$("#vcenter_ccr_ref", context).attr("required", "");
$("#MEMORY", context).attr("pattern", "^([048]|\\d*[13579][26]|\\d*[24680][048])$");
- $('.only_kvm').hide();
- $('.only_lxd').hide();
- $('.only_vcenter').show();
+ $(".only_kvm").hide();
+ $(".only_lxc").hide();
+ $(".only_vcenter").show();
} else {
$("#vcenter_template_ref", context).removeAttr("required");
$("#vcenter_instance_id", context).removeAttr("required");
$("#vcenter_ccr_ref", context).removeAttr("required");
$("#MEMORY", context).removeAttr("pattern");
- $('.only_kvm').show();
- $('.only_vcenter').hide();
- if (this.value != "lxd")
+ $(".only_kvm").show();
+ $(".only_vcenter").hide();
+ if (this.value != "lxc")
{
- $('.only_lxd').hide();
- $('.not_lxd').show();
- $('.raw_type').val('kvm');
+ $(".only_lxc").hide();
+ $(".not_lxc").show();
+ $(".raw_type").val("kvm");
}
}
// There is another listener in context.js setup
- // Needs proper LXD view, this is just a workaround
- // All KVM settings are available in LXD plus
+ // Needs proper LXC view, this is just a workaround
+ // All KVM settings are available in LXC plus
// Privileged, Profile and Security Nesting
-
- if (this.value == "lxd") {
- $('.only_lxd').show();
- $('.not_lxd').hide();
- $('.raw_type').val('lxd');
+ if (this.value == "lxc") {
+ $(".only_lxc").show();
+ $(".not_lxc").hide();
+ $(".raw_type").val("lxc");
}
var formContext = "#createVMTemplateFormWizard";
var NUMA_THREADS_MIN = 1;
var NUMA_THREADS_MAX = 2;
- if (this.value == "firecracker") {
+ var cpu_input = "";
+ if (this.value === "firecracker") {
// [GENERAL]
- $(".cpu_input > input", formContext).val("1");
+ cpu_input = "1";
// [NUMA]
$("#numa-pin-policy", formContext).val("SHARED");
$("#numa-sockets", formContext).val("1");
@@ -244,23 +244,20 @@ define(function(require) {
.prop("max", NUMA_THREADS_MAX)
.val(function(_, value) {
return (value > NUMA_THREADS_MAX) ? NUMA_THREADS_MAX : NUMA_THREADS_MIN;
- })
-
- $('.disabled_firecracker', formContext).prop("disabled", true);
- $('.not_firecracker', formContext).hide();
- $('.not_vcenter', formContext).show();
- $('.only_vcenter', formContext).hide();
- }
- else if (this.value == "vcenter"){
- // [GENERAL]
- $(".cpu_input > input", formContext).val("");
+ });
+ $(".disabled_firecracker", formContext).prop("disabled", true);
+ $(".not_firecracker", formContext).hide();
+ $(".not_vcenter", formContext).show();
+ $(".only_vcenter", formContext).hide();
+ }
+ else if (this.value === "vcenter"){
// [NUMA]
$("#numa-pin-policy", formContext)
.prop("disabled", false)
.val("NONE")
.prop("disabled", true);
-
+
$("#numa-sockets", formContext)
.val("");
@@ -270,34 +267,38 @@ define(function(require) {
.val("1")
.prop("disabled", true);
-
- $('.disabled_firecracker', formContext).removeAttr("disabled");
- $('.not_firecracker', formContext).show();
- $('.not_vcenter', formContext).hide();
- $('.only_vcenter', formContext).show();
+
+ $(".disabled_firecracker", formContext).removeAttr("disabled");
+ $(".not_firecracker", formContext).show();
+ $(".not_vcenter", formContext).hide();
+ $(".only_vcenter", formContext).show();
CoresPerSocket.calculateSockets(VCPU_SELECTOR);
- }
- else {
- // [GENERAL]
- $(".cpu_input > input", formContext).val("");
+ } else {
// [NUMA]
$("#numa-pin-policy", formContext)
.prop("disabled", false)
.val("NONE");
-
+
$("#numa-sockets", formContext).val("");
-
+
$("#numa-threads", formContext)
.prop("disabled", false)
.removeAttr("max")
.val("");
- $('.disabled_firecracker', formContext).removeAttr("disabled");
- $('.not_firecracker', formContext).show();
- $('.not_vcenter', formContext).show();
- $('.only_vcenter', formContext).hide();
+ $(".disabled_firecracker", formContext).removeAttr("disabled");
+ $(".not_firecracker", formContext).show();
+ $(".not_vcenter", formContext).show();
+ $(".only_vcenter", formContext).hide();
+ if(this.value === "lxc"){
+ $(".not_lxc").hide();
+ $(".only_kvm").hide();
+ $(".only_vcenter").hide();
+ $(".only_firecracker").hide();
+ }
}
+ $(".cpu_input > input", formContext).val(cpu_input);
});
CapacityCreate.setup($("div.capacityCreate", context));
@@ -313,104 +314,71 @@ define(function(require) {
var selectHypervisor = $("#template_hypervisor_form", context);
var id = mode+"Radio";
var option = selectHypervisor.find("#"+id).remove();
- var label = selectHypervisor.find('label[for="'+id+'"]').remove();
+ var label = selectHypervisor.find("label[for=\""+id+"\"]").remove();
}
}
if (config["mode"] === "kvm"){
$("#kvmRadio", context).click();
removeByMode("vcenter");
- $('.only_kvm').show();
- $('.only_vcenter').hide();
+ $(".only_kvm").show();
+ $(".only_vcenter").hide();
} else if (config["mode"] === "vcenter"){
$("#vcenterRadio", context).click();
removeByMode("kvm");
- $('.only_kvm').hide();
- $('.only_vcenter').show();
+ $(".only_kvm").hide();
+ $(".only_vcenter").show();
}
- fillLXDProfiles(context)
-
fillMarketplaces();
}
function fillMarketplaces(){
var fillMP = function(_, marketplaces){
// EMPTY
- $('#MARKETPLACE_ID').empty();
- $('#MARKETPLACE_ID').append('');
-
+ $("#MARKETPLACE_ID").empty();
+ $("#MARKETPLACE_ID").append("");
+
$.each(marketplaces, function(index, marketplace){
var id = marketplace.MARKETPLACE.ID;
- var text = id + ' - ' + marketplace.MARKETPLACE.NAME;
+ var text = id + " - " + marketplace.MARKETPLACE.NAME;
var type = marketplace.MARKETPLACE.MARKET_MAD;
-
+
if (type == "http" || type == "s3"){
- $('#MARKETPLACE_ID').append('")
+ $("#MARKETPLACE_ID").append("");
}
-
+
});
- }
-
+ };
+
OpenNebulaMarketplace.list({
- success: fillMP,
- error: Notifier.onError,
+ success: fillMP,
+ error: Notifier.onError,
options: {force: true} // Do not use cache
});
}
- function fillLXDProfiles(context){
- OpenNebulaHost.lxdProfilesInfo({
- data : {},
- timeout: true,
- success: function (request, lxdProfilesInfo){
- if ($("#lxd_profile", context).html() === undefined){
- lxdprofiles = lxdProfilesInfo;
-
- var html = "";
- $("#lxd_profile_label", context).append(html);
- }
-
- },
- error: function(request, error_json){
- console.error("There was an error requesting lxd info: " +
- error_json.error.message);
- }
- });
- }
-
function _retrieve(context) {
var templateJSON = WizardFields.retrieve(context);
- if (templateJSON["HYPERVISOR"] == 'vcenter') {
+ if (templateJSON["HYPERVISOR"] == "vcenter") {
templateJSON["VCENTER_TEMPLATE_REF"] = WizardFields.retrieveInput($("#vcenter_template_ref", context));
templateJSON["VCENTER_CCR_REF"] = WizardFields.retrieveInput($("#vcenter_ccr_ref", context));
templateJSON["VCENTER_INSTANCE_ID"] = WizardFields.retrieveInput($("#vcenter_instance_id", context));
if (Config.isFeatureEnabled("vcenter_vm_folder")) {
- templateJSON["VCENTER_VM_FOLDER"] = WizardFields.retrieveInput($("#vcenter_vm_folder", context))
+ templateJSON["VCENTER_VM_FOLDER"] = WizardFields.retrieveInput($("#vcenter_vm_folder", context));
}
}
- if (templateJSON["HYPERVISOR"] == 'lxd') {
- templateJSON["LXD_SECURITY_PRIVILEGED"] = WizardFields.retrieveInput($("#lxd_security_privileged", context));
- templateJSON["LXD_PROFILE"] = WizardFields.retrieveInput($("#lxd_profile", context));
- templateJSON["LXD_SECURITY_NESTING"] = WizardFields.retrieveInput($("#lxd_security_nesting", context));
- }
-
var sunstone_template = {};
- if ($('#sunstone_network_select:checked', context).length > 0) {
- sunstone_template["NETWORK_SELECT"] = "NO"
+ if ($("#sunstone_network_select:checked", context).length > 0) {
+ sunstone_template["NETWORK_SELECT"] = "NO";
}
if (!$.isEmptyObject(sunstone_template)) {
- templateJSON['SUNSTONE'] = sunstone_template;
+ templateJSON["SUNSTONE"] = sunstone_template;
}
var userInputs = {};
@@ -418,36 +386,36 @@ define(function(require) {
// Retrieve Resource Pool Attribute
var rpInput = $(".vcenter_rp_input", context);
if (rpInput.length > 0) {
- var rpModify = WizardFields.retrieveInput($('.modify_rp', rpInput));
- var rpInitial = WizardFields.retrieveInput($('.initial_rp', rpInput));
- var rpParams = WizardFields.retrieveInput($('.available_rps', rpInput));
+ var rpModify = WizardFields.retrieveInput($(".modify_rp", rpInput));
+ var rpInitial = WizardFields.retrieveInput($(".initial_rp", rpInput));
+ var rpParams = WizardFields.retrieveInput($(".available_rps", rpInput));
- if (rpModify === 'fixed' && rpInitial !== '') {
- templateJSON['VCENTER_RESOURCE_POOL'] = rpInitial;
- } else if (rpModify === 'list' && rpParams !== '') {
+ if (rpModify === "fixed" && rpInitial !== "") {
+ templateJSON["VCENTER_RESOURCE_POOL"] = rpInitial;
+ } else if (rpModify === "list" && rpParams !== "") {
var rpUserInputs = UserInputs.marshall({
- type: 'list',
+ type: "list",
description: Locale.tr("Which resource pool you want this VM to run in?"),
initial: rpInitial,
- params: WizardFields.retrieveInput($('.available_rps', rpInput))
+ params: WizardFields.retrieveInput($(".available_rps", rpInput))
});
- userInputs['VCENTER_RESOURCE_POOL'] = rpUserInputs;
+ userInputs["VCENTER_RESOURCE_POOL"] = rpUserInputs;
}
}
// Since the USER_INPUTS section is not enabled for vCenter, we can assume that there are no more user inputs defined
if (!$.isEmptyObject(userInputs)) {
- templateJSON['USER_INPUTS'] = userInputs;
+ templateJSON["USER_INPUTS"] = userInputs;
}
$.extend(true, templateJSON, CapacityCreate.retrieve($("div.capacityCreate", context)));
- if (templateJSON['MEMORY_COST'] && templateJSON['MEMORY_UNIT_COST'] && templateJSON['MEMORY_UNIT_COST'] == "GB") {
- templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST'] / 1024;
+ if (templateJSON["MEMORY_COST"] && templateJSON["MEMORY_UNIT_COST"] && templateJSON["MEMORY_UNIT_COST"] == "GB") {
+ templateJSON["MEMORY_COST"] = templateJSON["MEMORY_COST"] / 1024;
}
- if (templateJSON['DISK_COST']) {
- templateJSON['DISK_COST'] = (templateJSON['DISK_COST'] / 1024).toString();
+ if (templateJSON["DISK_COST"]) {
+ templateJSON["DISK_COST"] = (templateJSON["DISK_COST"] / 1024).toString();
}
var as_uid = this.usersTable.retrieveResourceTableSelect();
@@ -461,16 +429,16 @@ define(function(require) {
}
templateJSON.HOT_RESIZE = {
- 'CPU_HOT_ADD_ENABLED': templateJSON['CPU_HOT_ADD_ENABLED'],
- 'MEMORY_HOT_ADD_ENABLED': templateJSON['MEMORY_HOT_ADD_ENABLED'],
- }
+ "CPU_HOT_ADD_ENABLED": templateJSON["CPU_HOT_ADD_ENABLED"],
+ "MEMORY_HOT_ADD_ENABLED": templateJSON["MEMORY_HOT_ADD_ENABLED"],
+ };
delete templateJSON.CPU_HOT_ADD_ENABLED;
delete templateJSON.MEMORY_HOT_ADD_ENABLED;
templateJSON.BACKUP = {
- 'FREQUENCY_SECONDS': templateJSON['FREQUENCY_SECONDS'],
- 'MARKETPLACE_ID': templateJSON['MARKETPLACE_ID'],
- }
+ "FREQUENCY_SECONDS": templateJSON["FREQUENCY_SECONDS"],
+ "MARKETPLACE_ID": templateJSON["MARKETPLACE_ID"],
+ };
delete templateJSON.FREQUENCY_SECONDS;
delete templateJSON.MARKETPLACE_ID;
@@ -479,11 +447,11 @@ define(function(require) {
function _fill(context, templateJSON) {
- if (templateJSON['MEMORY_COST'] && templateJSON['MEMORY_UNIT_COST'] && templateJSON['MEMORY_UNIT_COST'] == "GB") {
- templateJSON['MEMORY_COST'] = templateJSON['MEMORY_COST'] * 1024;
+ if (templateJSON["MEMORY_COST"] && templateJSON["MEMORY_UNIT_COST"] && templateJSON["MEMORY_UNIT_COST"] == "GB") {
+ templateJSON["MEMORY_COST"] = templateJSON["MEMORY_COST"] * 1024;
}
- if (templateJSON['DISK_COST']) {
- templateJSON['DISK_COST'] = templateJSON['DISK_COST'] * 1024;
+ if (templateJSON["DISK_COST"]) {
+ templateJSON["DISK_COST"] = templateJSON["DISK_COST"] * 1024;
}
that.templateDISKS = $.extend(true, {}, templateJSON.DISK);
@@ -499,7 +467,7 @@ define(function(require) {
}
if (Config.isFeatureEnabled("vcenter_vm_folder")) {
- if (templateJSON["HYPERVISOR"] == 'vcenter' &&
+ if (templateJSON["HYPERVISOR"] == "vcenter" &&
templateJSON["VCENTER_VM_FOLDER"]) {
WizardFields.fillInput($("#vcenter_vm_folder", context), templateJSON["VCENTER_VM_FOLDER"]);
}
@@ -509,7 +477,7 @@ define(function(require) {
delete templateJSON["VCENTER_VM_FOLDER"];
- if (templateJSON["HYPERVISOR"] == 'vcenter') {
+ if (templateJSON["HYPERVISOR"] == "vcenter") {
var publicClouds = templateJSON["PUBLIC_CLOUD"];
if (publicClouds != undefined) {
@@ -526,13 +494,11 @@ define(function(require) {
}
}
- // LXD specific attributes
- if (templateJSON["HYPERVISOR"] == 'lxd') {
- fillLXD(context, templateJSON)
- }
+ // LXC specific attributes
+ if (templateJSON["HYPERVISOR"] == "lxc") {}
if (templateJSON["HYPERVISOR"]) {
- $("input[name='hypervisor'][value='"+templateJSON["HYPERVISOR"]+"']", context).trigger("click")
+ $("input[name='hypervisor'][value='"+templateJSON["HYPERVISOR"]+"']", context).trigger("click");
delete templateJSON["HYPERVISOR"];
}
@@ -540,17 +506,17 @@ define(function(require) {
if (templateJSON["USER_INPUTS"]["VCENTER_RESOURCE_POOL"]) {
var rp = UserInputs.unmarshall(templateJSON["USER_INPUTS"]["VCENTER_RESOURCE_POOL"]);
- $('.modify_rp', context).val('list');
- $('.initial_rp', context).val(rp.initial);
- $('.available_rps', context).val(rp.params);
+ $(".modify_rp", context).val("list");
+ $(".initial_rp", context).val(rp.initial);
+ $(".available_rps", context).val(rp.params);
delete templateJSON["USER_INPUTS"]["VCENTER_RESOURCE_POOL"];
}
}
if (templateJSON["VCENTER_RESOURCE_POOL"]) {
- $('.modify_rp', context).val('fixed');
- WizardFields.fillInput($('.initial_rp', context), templateJSON["VCENTER_RESOURCE_POOL"]);
+ $(".modify_rp", context).val("fixed");
+ WizardFields.fillInput($(".initial_rp", context), templateJSON["VCENTER_RESOURCE_POOL"]);
delete templateJSON["VCENTER_RESOURCE_POOL"];
}
@@ -590,45 +556,28 @@ define(function(require) {
delete templateJSON["AS_GID"];
}
- if (templateJSON['HOT_RESIZE']){
- if (templateJSON.HOT_RESIZE['MEMORY_HOT_ADD_ENABLED']){
- WizardFields.fillInput($('#MEMORY_HOT_ADD_ENABLED',context), templateJSON.HOT_RESIZE['MEMORY_HOT_ADD_ENABLED']);
+ if (templateJSON["HOT_RESIZE"]){
+ if (templateJSON.HOT_RESIZE["MEMORY_HOT_ADD_ENABLED"]){
+ WizardFields.fillInput($("#MEMORY_HOT_ADD_ENABLED",context), templateJSON.HOT_RESIZE["MEMORY_HOT_ADD_ENABLED"]);
}
- if (templateJSON.HOT_RESIZE['CPU_HOT_ADD_ENABLED']){
- WizardFields.fillInput($('#CPU_HOT_ADD_ENABLED',context), templateJSON.HOT_RESIZE['CPU_HOT_ADD_ENABLED']);
+ if (templateJSON.HOT_RESIZE["CPU_HOT_ADD_ENABLED"]){
+ WizardFields.fillInput($("#CPU_HOT_ADD_ENABLED",context), templateJSON.HOT_RESIZE["CPU_HOT_ADD_ENABLED"]);
}
- delete templateJSON['HOT_RESIZE'];
+ delete templateJSON["HOT_RESIZE"];
}
// Fill backup attributes
- if (templateJSON['BACKUP']){
- if (templateJSON.BACKUP['FREQUENCY_SECONDS']){
- WizardFields.fillInput($('#FREQUENCY_SECONDS',context), templateJSON.BACKUP['FREQUENCY_SECONDS']);
+ if (templateJSON["BACKUP"]){
+ if (templateJSON.BACKUP["FREQUENCY_SECONDS"]){
+ WizardFields.fillInput($("#FREQUENCY_SECONDS",context), templateJSON.BACKUP["FREQUENCY_SECONDS"]);
}
- if (templateJSON.BACKUP['MARKETPLACE_ID']){
- WizardFields.fillInput($('#MARKETPLACE_ID',context), templateJSON.BACKUP['MARKETPLACE_ID']);
+ if (templateJSON.BACKUP["MARKETPLACE_ID"]){
+ WizardFields.fillInput($("#MARKETPLACE_ID",context), templateJSON.BACKUP["MARKETPLACE_ID"]);
}
- delete templateJSON['BACKUP'];
+ delete templateJSON["BACKUP"];
}
WizardFields.fill(context, templateJSON);
}
- function fillLXD(context, templateJSON) {
- if (templateJSON["LXD_SECURITY_PRIVILEGED"]){
- WizardFields.fillInput($("#lxd_security_privileged", context), templateJSON["LXD_SECURITY_PRIVILEGED"]);
- delete templateJSON["LXD_SECURITY_PRIVILEGED"];
- }
-
- if (templateJSON["LXD_PROFILE"]){
- WizardFields.fillInput($("#lxd_profile", context), templateJSON["LXD_PROFILE"]);
- delete templateJSON["LXD_PROFILE"];
- }
-
- if (templateJSON["LXD_SECURITY_NESTING"]){
- WizardFields.fillInput($("#lxd_security_nesting", context), templateJSON["LXD_SECURITY_NESTING"]);
- delete templateJSON["LXD_SECURITY_NESTING"];
- }
- }
-
});
diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs
index b405687b2e..915d7cbb4c 100644
--- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs
+++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs
@@ -31,8 +31,8 @@
-
-
+
+
@@ -121,38 +121,6 @@
-