mirror of https://github.com/apache/cloudstack.git
bug 7905: VM wizard - populate hypervisor dropdown by listHypervisors API response instead of hardcoding.
This commit is contained in:
parent
621f893f12
commit
190a95413e
|
|
@ -854,9 +854,11 @@
|
|||
<div class="rev_wiztemp_hypervisortext">
|
||||
Hypervisor:
|
||||
<select id="hypervisor_select" class="select" style="width: 70px; float: none; height: 15px; font-size: 10px; margin: 0 0 0 5px; display: inline;">
|
||||
<!--
|
||||
<option value='XenServer'>XenServer</option>
|
||||
<option value='VmWare'>VmWare</option>
|
||||
<option value='KVM'>KVM</option>
|
||||
-->
|
||||
</select>
|
||||
</div>
|
||||
<div class="rev_wiztemp_ownertext">
|
||||
|
|
|
|||
|
|
@ -150,6 +150,20 @@ function afterLoadInstanceJSP() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listHypervisors"),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var items = json.listhypervisorsresponse.hypervisor;
|
||||
var $hypervisorDropdown = $("#vmiso_in_vmwizard").find("#hypervisor_select");
|
||||
if(items != null && items.length > 0) {
|
||||
for(var i=0; i<items.length; i++) {
|
||||
$hypervisorDropdown.append("<option value='"+fromdb(items[i].name)+"'>"+fromdb(items[i].name)+"</option>");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function bindStartVMButton() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue