mirror of https://github.com/apache/cloudstack.git
bug 7701: Cluster page - add "Add Host" button, "Add Primary Storage" button.
This commit is contained in:
parent
3e70151dad
commit
ed35b54224
|
|
@ -98,3 +98,240 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- top buttons (begin) -->
|
||||
<div id="top_buttons">
|
||||
<div class="actionpanel_button_wrapper" id="add_host_button">
|
||||
<div class="actionpanel_button">
|
||||
<div class="actionpanel_button_icons">
|
||||
<img src="images/addvm_actionicon.png" alt="Add Host" /></div>
|
||||
<div class="actionpanel_button_links">
|
||||
Add Host
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actionpanel_button_wrapper" id="add_primarystorage_button">
|
||||
<div class="actionpanel_button">
|
||||
<div class="actionpanel_button_icons">
|
||||
<img src="images/addvm_actionicon.png" alt="Add Primary Storage" /></div>
|
||||
<div class="actionpanel_button_links">
|
||||
Add Primary Storage
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- top buttons (end) -->
|
||||
|
||||
<!-- Add Host Dialog -->
|
||||
<div id="dialog_add_host" title="Add Host" style="display: none">
|
||||
<p>
|
||||
Add a host for zone <b><span id="zone_name"></span></b>, pod <b><span id="pod_name">
|
||||
</span></b>
|
||||
</p>
|
||||
<div class="dialog_formcontent">
|
||||
<form action="#" method="post" id="form_acquire">
|
||||
<ol>
|
||||
<li>
|
||||
<label for="host_hypervisor">Hypervisor:</label>
|
||||
<select class="select" id="host_hypervisor">
|
||||
<option value="XenServer" SELECTED>Xen Server</option>
|
||||
<option value="KVM">KVM</option>
|
||||
<option value="VmWare">VMware</option>
|
||||
</select>
|
||||
</li>
|
||||
<li input_group="general">
|
||||
<label for="host_hostname">
|
||||
Host name:</label>
|
||||
<input class="text" type="text" name="host_hostname" id="host_hostname" />
|
||||
<div id="host_hostname_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="general">
|
||||
<label for="user_name">
|
||||
User name:</label>
|
||||
<input class="text" type="text" name="host_username" id="host_username" />
|
||||
<div id="host_username_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="general">
|
||||
<label for="user_name">
|
||||
Password:</label>
|
||||
<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 input_group="vmware">
|
||||
<label for="host_vcenter_address">
|
||||
vCenter Address:</label>
|
||||
<input class="text" type="text" name="host_vcenter_address" id="host_vcenter_address" />
|
||||
<div id="host_vcenter_address_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmware">
|
||||
<label for="host_vcenter_username">
|
||||
vCenter User:</label>
|
||||
<input class="text" type="text" name="host_vcenter_username" id="host_vcenter_username" />
|
||||
<div id="host_vcenter_username_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmware">
|
||||
<label for="host_vcenter_password">
|
||||
vCenter Password:</label>
|
||||
<input class="text" type="password" name="host_vcenter_password" id="host_vcenter_password" autocomplete="off" />
|
||||
<div id="host_vcenter_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmware">
|
||||
<label for="host_vcenter_dc">
|
||||
vCenter Datacenter:</label>
|
||||
<input class="text" type="text" name="host_vcenter_dc" id="host_vcenter_dc" />
|
||||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmware">
|
||||
<label for="host_vcenter_host">
|
||||
vCenter Host:</label>
|
||||
<input class="text" type="text" name="host_vcenter_host" id="host_vcenter_host" />
|
||||
<div id="host_vcenter_host_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li id="cluster_options_container">
|
||||
<label>
|
||||
</label><span><u>Cluster Options</u></span> </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>
|
||||
</li>
|
||||
<li id="existing_cluster_radio_container">
|
||||
<label>
|
||||
<input type="radio" name="cluster" value="existing_cluster_radio" /> Join cluster:</label>
|
||||
<select class="select" id="cluster_select">
|
||||
</select>
|
||||
</li>
|
||||
<li id="no_cluster_radio_container">
|
||||
<label>
|
||||
<input type="radio" name="cluster" value="no_cluster_radio" /> Standalone</label>
|
||||
<span style="padding-left: 20px"></span></li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
<!--Loading box-->
|
||||
<div id="spinning_wheel" class="ui_dialog_loaderbox" style="display: none;">
|
||||
<div class="ui_dialog_loader">
|
||||
</div>
|
||||
<p>
|
||||
Adding....</p>
|
||||
</div>
|
||||
<!--Confirmation msg box-->
|
||||
<!--Note: for error msg, just have to add error besides everything for eg. add error(class) next to ui_dialog_messagebox error, ui_dialog_msgicon error, ui_dialog_messagebox_text error. -->
|
||||
<div id="info_container" class="ui_dialog_messagebox error" style="display: none;">
|
||||
<div id="icon" class="ui_dialog_msgicon error">
|
||||
</div>
|
||||
<div id="info" class="ui_dialog_messagebox_text error">
|
||||
(info)</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add Primary Storage Dialog -->
|
||||
<div id="dialog_add_pool" title="Add Primary Storage" style="display: none">
|
||||
<p>
|
||||
Add a new Primary Storage for zone <b><span id="zone_name"></span></b>, pod <b><span
|
||||
id="pod_name"></span></b>
|
||||
</p>
|
||||
<div class="dialog_formcontent">
|
||||
<form action="#" method="post" id="form_acquire">
|
||||
<ol>
|
||||
<li id="pool_cluster_container">
|
||||
<label for="pool_cluster">
|
||||
Cluster:</label>
|
||||
<select class="select" id="pool_cluster">
|
||||
</select>
|
||||
<div id="pool_cluster_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="user_name">
|
||||
Name:</label>
|
||||
<input class="text" type="text" name="add_pool_name" id="add_pool_name" />
|
||||
<div id="add_pool_name_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="add_pool_protocol">
|
||||
Protocol:</label>
|
||||
<select class="select" id="add_pool_protocol">
|
||||
<option value="nfs">NFS</option>
|
||||
<option value="iscsi">ISCSI</option>
|
||||
<option value="vmfs">VMFS</option>
|
||||
</select>
|
||||
</li>
|
||||
<li id="add_pool_server_container">
|
||||
<label for="add_pool_nfs_server">
|
||||
Server:</label>
|
||||
<input class="text" type="text" name="add_pool_nfs_server" id="add_pool_nfs_server" />
|
||||
<div id="add_pool_nfs_server_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li id="add_pool_path_container" input_group="nfs">
|
||||
<label for="add_pool_path">
|
||||
Path:</label>
|
||||
<input class="text" type="text" name="add_pool_path" id="add_pool_path" />
|
||||
<div id="add_pool_path_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li id="add_pool_iqn_container" style="display: none" input_group="iscsi">
|
||||
<label for="add_pool_iqn">
|
||||
Target IQN:</label>
|
||||
<input class="text" type="text" name="add_pool_iqn" id="add_pool_iqn" />
|
||||
<div id="add_pool_iqn_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li id="add_pool_lun_container" style="display: none" input_group="iscsi">
|
||||
<label for="add_pool_lun">
|
||||
LUN #:</label>
|
||||
<input class="text" type="text" name="add_pool_lun" id="add_pool_lun" />
|
||||
<div id="add_pool_lun_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmfs">
|
||||
<label for="add_pool_vmfs_dc">
|
||||
vCenter Datacenter:</label>
|
||||
<input class="text" type="text" name="add_pool_vmfs_dc" id="add_pool_vmfs_dc" />
|
||||
<div id="add_pool_vmfs_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li input_group="vmfs">
|
||||
<label for="add_pool_vmfs_ds">
|
||||
vCenter Datastore:</label>
|
||||
<input class="text" type="text" name="add_pool_vmfs_ds" id="add_pool_vmfs_ds" />
|
||||
<div id="add_pool_vmfs_ds_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li id="add_pool_tags_container">
|
||||
<label for="add_pool_tags">
|
||||
Tags:</label>
|
||||
<input class="text" type="text" id="add_pool_tags" />
|
||||
<div id="add_pool_tags_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
<!--Loading box-->
|
||||
<div id="spinning_wheel" class="ui_dialog_loaderbox" style="display: none;">
|
||||
<div class="ui_dialog_loader">
|
||||
</div>
|
||||
<p>
|
||||
Adding....</p>
|
||||
</div>
|
||||
<!--Confirmation msg box-->
|
||||
<!--Note: for error msg, just have to add error besides everything for eg. add error(class) next to ui_dialog_messagebox error, ui_dialog_msgicon error, ui_dialog_messagebox_text error. -->
|
||||
<div id="info_container" class="ui_dialog_messagebox error" style="display: none;">
|
||||
<div id="icon" class="ui_dialog_msgicon error">
|
||||
</div>
|
||||
<div id="info" class="ui_dialog_messagebox_text error">
|
||||
(info)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -17,39 +17,14 @@
|
|||
*/
|
||||
|
||||
function afterLoadClusterJSP($midmenuItem1) {
|
||||
/*
|
||||
var objCluster = $midmenuItem1.data("jsonObj");
|
||||
listMidMenuItems(("listHosts&type=Routing&clusterid="+objCluster.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+objCluster.id));
|
||||
|
||||
|
||||
clearButtonsOnTop();
|
||||
|
||||
initDialog("dialog_add_host");
|
||||
initDialog("dialog_add_pool");
|
||||
bindEventHandlerToDialogAddPool($("#dialog_add_pool"));
|
||||
|
||||
clusterToRightPanel($midmenuItem1);
|
||||
*/
|
||||
initDialog("dialog_add_pool");
|
||||
}
|
||||
|
||||
|
||||
function clusterToRightPanel($midmenuItem1) {
|
||||
$("#right_panel_content").data("$midmenuItem1", $midmenuItem1);
|
||||
clusterJsonToDetailsTab();
|
||||
|
||||
/*
|
||||
var objCluster = $midmenuItem1.data("jsonObj");
|
||||
|
||||
clearButtonsOnTop();
|
||||
initAddHostButton($("#midmenu_add_host_button"), "cluster_page", $midmenuItem1);
|
||||
|
||||
initAddPrimaryStorageButton($("#midmenu_add_primarystorage_button"), "cluster_page", $midmenuItem1);
|
||||
|
||||
listMidMenuItems(("listHosts&type=Routing&clusterid="+objCluster.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+objCluster.id));
|
||||
|
||||
$("#right_panel_content").data("$midmenuItem1", $midmenuItem1);
|
||||
clusterJsonToDetailsTab();
|
||||
*/
|
||||
}
|
||||
|
||||
function clusterClearRightPanel() {
|
||||
|
|
@ -64,6 +39,9 @@ function clusterJsonToDetailsTab() {
|
|||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
if(jsonObj == null)
|
||||
return;
|
||||
|
||||
bindAddHostButton($midmenuItem1);
|
||||
bindAddPrimaryStorageButton($midmenuItem1);
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters&id="+jsonObj.id),
|
||||
|
|
|
|||
Loading…
Reference in New Issue