mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #2911: Add vCenter host type
This commit is contained in:
parent
f559e1e31a
commit
956b691878
@ -31,19 +31,13 @@ var create_host_tmpl =
|
||||
<label for="name">' + tr("Hostname") + '</label>\
|
||||
<input type="text" name="name" id="name" />\
|
||||
</div>\
|
||||
<div class="large-6 columns" id="cluster_select">\
|
||||
<label for="host_cluster_id">' + tr("Cluster") + '</label>\
|
||||
<div id="host_cluster_id" name="host_cluster_id">\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-6 columns">\
|
||||
<label for="host_type">' + tr("Type") + '</label>\
|
||||
<select id="host_type_mad" name="host_type">\
|
||||
<option value="kvm">' + tr("KVM") + '</option>\
|
||||
<option value="xen">' + tr("XEN") + '</option>\
|
||||
<option value="vmware">' + tr("VMware") + '</option>\
|
||||
<option value="vcenter">' + tr("vCenter") + '</option>\
|
||||
<option value="az">' + tr("Microsoft Azure") + '</option>\
|
||||
<option value="ec2">' + tr("Amazon EC2") + '</option>\
|
||||
<option value="sl">' + tr("IBM Softlayer") + '</option>\
|
||||
@ -51,6 +45,13 @@ var create_host_tmpl =
|
||||
<option value="custom">' + tr("Custom") + '</option>\
|
||||
</select>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-6 columns" id="cluster_select">\
|
||||
<label for="host_cluster_id">' + tr("Cluster") + '</label>\
|
||||
<div id="host_cluster_id" name="host_cluster_id">\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="large-6 columns">\
|
||||
<div class="manager clear row" id="vnm_mads">\
|
||||
<div class="large-12 columns">\
|
||||
@ -84,6 +85,7 @@ var create_host_tmpl =
|
||||
<option value="kvm">' + tr("KVM") + '</option>\
|
||||
<option value="xen">' + tr("XEN") + '</option>\
|
||||
<option value="vmware">' + tr("VMware") + '</option>\
|
||||
<option value="vcenter">' + tr("vCenter") + '</option>\
|
||||
<option value="az">' + tr("Microsoft Azure") + '</option>\
|
||||
<option value="ec2">' + tr("Amazon EC2") + '</option>\
|
||||
<option value="sl">' + tr("IBM Softlayer") + '</option>\
|
||||
@ -105,6 +107,7 @@ var create_host_tmpl =
|
||||
<option value="kvm">' + tr("KVM") + '</option>\
|
||||
<option value="xen">' + tr("XEN") + '</option>\
|
||||
<option value="vmware">' + tr("VMware") + '</option>\
|
||||
<option value="vcenter">' + tr("vCenter") + '</option>\
|
||||
<option value="az">' + tr("Microsoft Azure") + '</option>\
|
||||
<option value="ec2">' + tr("Amazon EC2") + '</option>\
|
||||
<option value="sl">' + tr("IBM Softlayer") + '</option>\
|
||||
@ -121,6 +124,27 @@ var create_host_tmpl =
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</div>\
|
||||
<div class="row vcenter_credentials hidden">\
|
||||
<fieldset>\
|
||||
<legend>'+tr("vCenter")+'</legend>\
|
||||
<div class="large-6 columns">\
|
||||
<label for="vcenter_user">' + tr("User") + '</label>\
|
||||
<input type="text" name="vcenter_user" id="vcenter_user" />\
|
||||
</div>\
|
||||
<div class="large-6 columns">\
|
||||
<label for="vcenter_host">' + tr("Hostname") + '</label>\
|
||||
<input type="text" name="vcenter_host" id="vcenter_host" />\
|
||||
</div>\
|
||||
<div class="large-6 columns">\
|
||||
<label for="vcenter_password">' + tr("Password") + '</label>\
|
||||
<input type="text" name="vcenter_password" id="vcenter_password" />\
|
||||
</div>\
|
||||
<div class="large-6 columns">\
|
||||
<br>\
|
||||
<a class="button radius small right">'+tr("Get vCenter Clusters")+'</a>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
</div>\
|
||||
<br>\
|
||||
<div class="form_buttons row">\
|
||||
<button id="wizard_host_reset_button" class="button secondary radius" type="reset" value="reset">' + tr("Reset") + '</button>\
|
||||
@ -938,8 +962,19 @@ function setupCreateHostDialog(){
|
||||
$("#im_mad", $create_host_dialog).val(this.value).change();
|
||||
|
||||
if (this.value == "custom") {
|
||||
$(".vcenter_credentials", $create_host_dialog).hide();
|
||||
$("#vnm_mads", $create_host_dialog).show();
|
||||
$("#create_host_submit", $create_host_dialog).removeAttr("disabled");
|
||||
$(".drivers", $create_host_dialog).show();
|
||||
} else if (this.value == "vcenter") {
|
||||
$("#vnm_mads", $create_host_dialog).hide();
|
||||
$(".vcenter_credentials", $create_host_dialog).show();
|
||||
$("#create_host_submit", $create_host_dialog).attr("disabled", "disabled");
|
||||
$(".drivers", $create_host_dialog).hide();
|
||||
} else {
|
||||
$(".vcenter_credentials", $create_host_dialog).hide();
|
||||
$("#vnm_mads", $create_host_dialog).show();
|
||||
$("#create_host_submit", $create_host_dialog).removeAttr("disabled");
|
||||
$(".drivers", $create_host_dialog).hide();
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user