mirror of https://github.com/apache/cloudstack.git
Add Primary Storage dialog - rename Element ID of cluster dropdown.
This commit is contained in:
parent
20ae6c8f97
commit
7a9000328a
|
|
@ -957,9 +957,9 @@
|
|||
<li id="pool_cluster_container">
|
||||
<label for="pool_cluster">
|
||||
<fmt:message key="label.cluster"/>:</label>
|
||||
<select class="select" id="cluster_select">
|
||||
<select class="select" id="pool_cluster">
|
||||
</select>
|
||||
<div id="cluster_select_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
<div id="pool_cluster_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -533,9 +533,9 @@ dictionary = {
|
|||
<li id="pool_cluster_container">
|
||||
<label for="pool_cluster">
|
||||
<fmt:message key="label.cluster"/>:</label>
|
||||
<select class="select" id="cluster_select">
|
||||
<select class="select" id="pool_cluster">
|
||||
</select>
|
||||
<div id="cluster_select_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
<div id="pool_cluster_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -913,13 +913,7 @@ function initAddHostShortcut() {
|
|||
$thisDialog.find("#spinning_wheel").show()
|
||||
|
||||
var array1 = [];
|
||||
|
||||
/*
|
||||
var hypervisor = $thisDialog.find("#host_hypervisor").val();
|
||||
if(hypervisor.length > 0)
|
||||
array1.push("&hypervisor="+hypervisor);
|
||||
*/
|
||||
|
||||
|
||||
var zoneId = $thisDialog.find("#zone_dropdown").val();
|
||||
array1.push("&zoneid="+zoneId);
|
||||
|
||||
|
|
@ -1667,7 +1661,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
var podId = $(this).val();
|
||||
if(podId == null || podId.length == 0)
|
||||
return;
|
||||
var $clusterSelect = $dialogAddPool.find("#cluster_select").empty();
|
||||
var $clusterSelect = $dialogAddPool.find("#pool_cluster").empty();
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters&podid=" + podId),
|
||||
dataType: "json",
|
||||
|
|
@ -1689,7 +1683,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
});
|
||||
});
|
||||
|
||||
$dialogAddPool.find("#cluster_select").change(function() {
|
||||
$dialogAddPool.find("#pool_cluster").change(function() {
|
||||
var curOption = $(this).val();
|
||||
if(!curOption)
|
||||
return false;
|
||||
|
|
@ -1734,7 +1728,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
var isValid = true;
|
||||
isValid &= validateDropDownBox("Zone", $thisDialog.find("#zone_dropdown"), $thisDialog.find("#zone_dropdown_errormsg"));
|
||||
isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg"));
|
||||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
|
||||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text
|
||||
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
|
||||
if (protocol == "nfs" || protocol == "PreSetup" || protocol == "SharedMountPoint") {
|
||||
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
|
||||
|
|
@ -1766,7 +1760,7 @@ function initAddPrimaryStorageShortcut($midmenuAddLink2, currentPageInRightPanel
|
|||
var podId = $thisDialog.find("#pod_dropdown").val();
|
||||
array1.push("&podId="+podId);
|
||||
|
||||
var clusterId = $thisDialog.find("#cluster_select").val();
|
||||
var clusterId = $thisDialog.find("#pool_cluster").val();
|
||||
array1.push("&clusterid="+clusterId);
|
||||
|
||||
var name = trim($thisDialog.find("#add_pool_name").val());
|
||||
|
|
|
|||
|
|
@ -701,10 +701,7 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
|
|||
"Add": function() {
|
||||
var $thisDialog = $(this);
|
||||
$thisDialog.find("#info_container").hide();
|
||||
|
||||
//var hypervisor = $thisDialog.find("#host_hypervisor").val();
|
||||
//var clusterRadio = $thisDialog.find("input[name=cluster]:checked").val();
|
||||
|
||||
|
||||
// validate values
|
||||
var isValid = true;
|
||||
isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg"));
|
||||
|
|
@ -790,8 +787,7 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
|
|||
dataType: "json",
|
||||
success: function(json) {
|
||||
$thisDialog.find("#spinning_wheel").hide();
|
||||
$thisDialog.dialog("close");
|
||||
//expandClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, clusterId, $thisDialog); //expand cluster node to see host node
|
||||
$thisDialog.dialog("close");
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleError(XMLHttpResponse, function() {
|
||||
|
|
@ -836,7 +832,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
var podId = $(this).val();
|
||||
if(podId == null || podId.length == 0)
|
||||
return;
|
||||
var $clusterSelect = $dialogAddPool.find("#cluster_select").empty();
|
||||
var $clusterSelect = $dialogAddPool.find("#pool_cluster").empty();
|
||||
$.ajax({
|
||||
data: createURL("command=listClusters&podid=" + podId),
|
||||
dataType: "json",
|
||||
|
|
@ -859,7 +855,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
});
|
||||
});
|
||||
|
||||
$("#cluster_select", $dialogAddPool).unbind("change").bind("change", function(event) {
|
||||
$("#pool_cluster", $dialogAddPool).unbind("change").bind("change", function(event) {
|
||||
var curOption = $(this).val();
|
||||
if(!curOption)
|
||||
return false;
|
||||
|
|
@ -903,7 +899,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
|
||||
var isValid = true;
|
||||
isValid &= validateDropDownBox("Pod", $thisDialog.find("#pod_dropdown"), $thisDialog.find("#pod_dropdown_errormsg"));
|
||||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text
|
||||
isValid &= validateDropDownBox("Cluster", $thisDialog.find("#pool_cluster"), $thisDialog.find("#pool_cluster_errormsg"), false); //required, reset error text
|
||||
isValid &= validateString("Name", $thisDialog.find("#add_pool_name"), $thisDialog.find("#add_pool_name_errormsg"));
|
||||
if (protocol == "nfs" || protocol == "PreSetup" || protocol == "SharedMountPoint") {
|
||||
isValid &= validateString("Server", $thisDialog.find("#add_pool_nfs_server"), $thisDialog.find("#add_pool_nfs_server_errormsg"));
|
||||
|
|
@ -934,7 +930,7 @@ function bindAddPrimaryStorageButtonOnZonePage($button, zoneId, zoneName) {
|
|||
var podId = $thisDialog.find("#pod_dropdown").val();
|
||||
array1.push("&podId="+podId);
|
||||
|
||||
var clusterId = $thisDialog.find("#cluster_select").val();
|
||||
var clusterId = $thisDialog.find("#pool_cluster").val();
|
||||
array1.push("&clusterid="+clusterId);
|
||||
|
||||
var name = trim($thisDialog.find("#add_pool_name").val());
|
||||
|
|
|
|||
Loading…
Reference in New Issue