mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
bug 7357: pod page - clear tab when pod is deleted and a tab is clicked.
This commit is contained in:
parent
035adf4e57
commit
89961333c8
@ -54,12 +54,16 @@ function podJsonToRightPanel($leftmenuItem1) {
|
||||
|
||||
function podJsonToDetailsTab() {
|
||||
var $leftmenuItem1 = $("#right_panel_content").data("$leftmenuItem1");
|
||||
if($leftmenuItem1 == null)
|
||||
if($leftmenuItem1 == null) {
|
||||
podClearDetailsTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var jsonObj = $leftmenuItem1.data("jsonObj");
|
||||
if(jsonObj == null)
|
||||
if(jsonObj == null) {
|
||||
podClearDetailsTab();
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
data: createURL("command=listPods&id="+jsonObj.id),
|
||||
@ -139,12 +143,16 @@ function podJsonToDetailsTab() {
|
||||
|
||||
function podJsonToNetworkTab() {
|
||||
var $leftmenuItem1 = $("#right_panel_content").data("$leftmenuItem1");
|
||||
if($leftmenuItem1 == null)
|
||||
if($leftmenuItem1 == null) {
|
||||
podClearNetworkTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var jsonObj = $leftmenuItem1.data("jsonObj");
|
||||
if(jsonObj == null)
|
||||
if(jsonObj == null) {
|
||||
podClearNetworkTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var $thisTab = $("#right_panel_content #tab_content_ipallocation");
|
||||
$thisTab.find("#tab_container").hide();
|
||||
@ -170,6 +178,12 @@ function podJsonToNetworkTab() {
|
||||
});
|
||||
}
|
||||
|
||||
function podClearNetworkTab() {
|
||||
var $thisTab = $("#right_panel_content #tab_content_ipallocation");
|
||||
$thisTab.find("#tab_container").empty();
|
||||
}
|
||||
|
||||
|
||||
function podNetworkJsonToTemplate(jsonObj, template) {
|
||||
template.data("jsonObj", jsonObj);
|
||||
template.attr("id", "pod_VLAN_"+fromdb(jsonObj.id)).data("podVLANId", fromdb(jsonObj.id));
|
||||
@ -209,11 +223,12 @@ var podNetworkActionMap = {
|
||||
}
|
||||
}
|
||||
|
||||
function podJsonClearRightPanel(jsonObj) {
|
||||
podJsonClearDetailsTab(jsonObj);
|
||||
function podClearRightPanel() {
|
||||
podClearDetailsTab();
|
||||
podClearNetworkTab();
|
||||
}
|
||||
|
||||
function podJsonClearDetailsTab(jsonObj) {
|
||||
function podClearDetailsTab() {
|
||||
var $thisTab = $("#right_panel_content #tab_content_details");
|
||||
$thisTab.find("#grid_header_title").text("");
|
||||
$thisTab.find("#id").text("");
|
||||
@ -913,7 +928,7 @@ var podActionMap = {
|
||||
$(this).remove();
|
||||
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
|
||||
clearRightPanel();
|
||||
podJsonClearRightPanel();
|
||||
podClearRightPanel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user