mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-25 06:03:36 +03:00
Solved bug VM update conf (#1775)
This commit is contained in:
parent
ec517d0fc5
commit
b53cf7cadc
@ -267,16 +267,16 @@ define(function(require) {
|
|||||||
});
|
});
|
||||||
that.initrdFilesTable.refreshResourceTableSelect();
|
that.initrdFilesTable.refreshResourceTableSelect();
|
||||||
|
|
||||||
fillMachineTypesAndCPUModel();
|
fillMachineTypesAndCPUModel(context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillMachineTypesAndCPUModel(cpuModel, machineType){
|
function fillMachineTypesAndCPUModel(context, cpuModel, machineType){
|
||||||
OpenNebulaHost.kvmInfo({
|
OpenNebulaHost.kvmInfo({
|
||||||
data : {},
|
data : {},
|
||||||
timeout: true,
|
timeout: true,
|
||||||
success: function (request, kvmInfo){
|
success: function (request, kvmInfo){
|
||||||
if ($("#model-cpu").html() === undefined){
|
if ($("#model-cpu", context).html() === undefined){
|
||||||
machines = kvmInfo[0].set_kvm_machines;
|
machines = kvmInfo[0].set_kvm_machines;
|
||||||
cpus = kvmInfo[0].set_cpu_models;
|
cpus = kvmInfo[0].set_cpu_models;
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ define(function(require) {
|
|||||||
html += "<option value='" + machine + "'>" + machine + "</option>";
|
html += "<option value='" + machine + "'>" + machine + "</option>";
|
||||||
});
|
});
|
||||||
html += "</select>";
|
html += "</select>";
|
||||||
$("#kvm-info").append(html);
|
$("#kvm-info", context).append(html);
|
||||||
|
|
||||||
var html = "<select id=\"model-cpu\" wizard_field=\"MODEL\">";
|
var html = "<select id=\"model-cpu\" wizard_field=\"MODEL\">";
|
||||||
html += "<option value=\"\">" + " " + "</option>";
|
html += "<option value=\"\">" + " " + "</option>";
|
||||||
@ -295,11 +295,11 @@ define(function(require) {
|
|||||||
html += "<option value='" + cpu + "'>" + cpu + "</option>";
|
html += "<option value='" + cpu + "'>" + cpu + "</option>";
|
||||||
});
|
});
|
||||||
html += "</select>";
|
html += "</select>";
|
||||||
$("#cpu-model").append(html);
|
$("#cpu-model", context).append(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (machineType && machineType.MACHINE){ $("#machine-type").val(machineType.MACHINE); }
|
if (machineType && machineType.MACHINE){ $("#machine-type", context).val(machineType.MACHINE); }
|
||||||
if (cpuModel){ $("#model-cpu").val(cpuModel.MODEL); }
|
if (cpuModel){ $("#model-cpu", context).val(cpuModel.MODEL); }
|
||||||
},
|
},
|
||||||
error: function(request, error_json){
|
error: function(request, error_json){
|
||||||
console.error("There was an error requesting the KVM info: " +
|
console.error("There was an error requesting the KVM info: " +
|
||||||
@ -360,7 +360,7 @@ define(function(require) {
|
|||||||
delete templateJSON["FEATURES"];
|
delete templateJSON["FEATURES"];
|
||||||
}
|
}
|
||||||
|
|
||||||
fillMachineTypesAndCPUModel(modelJSON, osJSON);
|
fillMachineTypesAndCPUModel(context, modelJSON, osJSON);
|
||||||
|
|
||||||
delete templateJSON["OS"];
|
delete templateJSON["OS"];
|
||||||
delete templateJSON["CPU_MODEL"];
|
delete templateJSON["CPU_MODEL"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user