mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
(1) When hypervisor.type is kvm, allow option to add host in UI.
(2) When when hypervisor.type is kvm, hide cluster section in add host dialog.
This commit is contained in:
parent
7cf14dcffa
commit
66ccd6f7ad
@ -277,10 +277,10 @@
|
||||
<input class="text" type="password" name="host_password" id="host_password" AUTOCOMPLETE="off" />
|
||||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display:none;" ></div>
|
||||
</li>
|
||||
<li>
|
||||
<li id="cluster_options_container">
|
||||
<label> </label><span><u>Cluster Options</u></span>
|
||||
</li>
|
||||
<li>
|
||||
<li id="new_cluster_radio_container">
|
||||
<label><input type="radio" name="cluster" value="new_cluster_radio" checked /> New cluster:</label>
|
||||
<input class="text" type="text" id="new_cluster_name"/>
|
||||
<div id="new_cluster_name_errormsg" class="dialog_formcontent_errormsg" style="display:none;" ></div>
|
||||
|
||||
@ -24,7 +24,6 @@ function showHostsTab() {
|
||||
var pIndex = 0;
|
||||
|
||||
// Dialog Setup
|
||||
if (getHypervisorType() != "kvm") { //"xenserver"
|
||||
$("#host_action_new_routing").show();
|
||||
activateDialog($("#dialog_add_routing").dialog({
|
||||
autoOpen: false,
|
||||
@ -34,6 +33,10 @@ function showHostsTab() {
|
||||
|
||||
var dialogAddRouting = $("#dialog_add_routing");
|
||||
|
||||
//xenserver supports cluster. kvm doesn't support cluster.
|
||||
if (getHypervisorType() == "kvm")
|
||||
dialogAddRouting.find("#cluster_options_container, #new_cluster_radio_container, #existing_cluster_radio_container, #no_cluster_radio_container").hide();
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listZones&available=true&response=json"+maxPageSize),
|
||||
dataType: "json",
|
||||
@ -89,7 +92,7 @@ function showHostsTab() {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
activateDialog($("#dialog_update_os").dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
@ -576,7 +579,6 @@ function showHostsTab() {
|
||||
var submenuContent = $("#submenu_content_routing");
|
||||
|
||||
// Add New Routing Host
|
||||
if (getHypervisorType() != "kvm") {
|
||||
$("#host_action_new_routing").bind("click", function(event) {
|
||||
dialogAddRouting.find("#new_cluster_name").val("");
|
||||
dialogAddRouting.find("#host_zone").change(); //refresh cluster dropdown
|
||||
@ -610,6 +612,8 @@ function showHostsTab() {
|
||||
var password = trim(dialogBox.find("#host_password").val());
|
||||
array1.push("&password="+encodeURIComponent(password));
|
||||
|
||||
//xenserver supports cluster. kvm doesn't support cluster.
|
||||
if (getHypervisorType() != "kvm") {
|
||||
if(clusterRadio == "new_cluster_radio") {
|
||||
var newClusterName = trim(dialogBox.find("#new_cluster_name").val());
|
||||
array1.push("&clustername="+encodeURIComponent(newClusterName));
|
||||
@ -621,6 +625,7 @@ function showHostsTab() {
|
||||
array1.push("&clusterid="+clusterId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var hostname = trim(dialogBox.find("#host_hostname").val());
|
||||
var url;
|
||||
@ -673,7 +678,6 @@ function showHostsTab() {
|
||||
}).dialog("open");
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function listHosts() {
|
||||
var submenuContent = $("#submenu_content_routing");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user