mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
new UI - Resource page - Add Host shortcut dialog - when clicking Add Host button, expand the zone treenode that is selected in zone dropdown in dialog box.
This commit is contained in:
parent
d8fdcd3815
commit
7a9da982e3
@ -442,9 +442,8 @@ function initAddPodShortcut() {
|
||||
isValid &= validateString("Cluster Name", $thisDialog.find("#new_cluster_name"), $thisDialog.find("#new_cluster_name_errormsg"));
|
||||
}
|
||||
if (!isValid)
|
||||
return;
|
||||
|
||||
//$thisDialog.dialog("close"); //only close dialog when this action succeeds
|
||||
return;
|
||||
|
||||
$thisDialog.find("#spinning_wheel").show()
|
||||
|
||||
var array1 = [];
|
||||
@ -452,6 +451,12 @@ function initAddPodShortcut() {
|
||||
var zoneId = $thisDialog.find("#zone_dropdown").val();
|
||||
array1.push("&zoneid="+zoneId);
|
||||
|
||||
//expand zone in left menu tree (to show pod, cluster under the zone) ???
|
||||
var $zoneNode = $("#leftmenu_zone_tree").find("#tree_container").find("#zone_" + zoneId);
|
||||
|
||||
if($zoneNode.find("#zone_arrow").hasClass("expanded_close"))
|
||||
$zoneNode.find("#zone_arrow").click();
|
||||
|
||||
var podId = $thisDialog.find("#pod_dropdown").val();
|
||||
array1.push("&podid="+podId);
|
||||
|
||||
@ -513,8 +518,8 @@ function initAddPodShortcut() {
|
||||
clickClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, existingClusterId, $thisDialog);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
handleError(XMLHttpResponse, function() {
|
||||
clickClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, existingClusterId, $thisDialog);
|
||||
handleError(XMLHttpResponse, function() {
|
||||
clickClusterNodeAfterAddHost(clusterRadio, podId, newClusterName, existingClusterId, $thisDialog);
|
||||
handleErrorInDialog(XMLHttpResponse, $thisDialog);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user