mirror of https://github.com/apache/cloudstack.git
bug 7357: security group page - clean subgrid container when a security group is deleted and a tab is clicked.
This commit is contained in:
parent
3a54c145a2
commit
6c05b96ae0
|
|
@ -437,12 +437,16 @@ function securityGroupToRightPanel($midmenuItem1) {
|
|||
|
||||
function securityGroupJsonToDetailsTab() {
|
||||
var $midmenuItem1 = $("#right_panel_content").data("$midmenuItem1");
|
||||
if($midmenuItem1 == null)
|
||||
if($midmenuItem1 == null) {
|
||||
securityGroupClearDetailsTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
if(jsonObj == null)
|
||||
if(jsonObj == null) {
|
||||
securityGroupClearDetailsTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var $thisTab = $("#right_panel_content #tab_content_details");
|
||||
$thisTab.find("#tab_container").hide();
|
||||
|
|
@ -483,12 +487,16 @@ function securityGroupJsonToDetailsTab() {
|
|||
|
||||
function securityGroupJsonToIngressRuleTab() {
|
||||
var $midmenuItem1 = $("#right_panel_content").data("$midmenuItem1");
|
||||
if($midmenuItem1 == null)
|
||||
if($midmenuItem1 == null) {
|
||||
securityGroupClearIngressRuleTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var securityGroupObj = $midmenuItem1.data("jsonObj");
|
||||
if(securityGroupObj == null)
|
||||
if(securityGroupObj == null) {
|
||||
securityGroupClearIngressRuleTab();
|
||||
return;
|
||||
}
|
||||
|
||||
var $thisTab = $("#right_panel_content").find("#tab_content_ingressrule");
|
||||
$thisTab.find("#tab_container").hide();
|
||||
|
|
@ -516,6 +524,11 @@ function securityGroupJsonToIngressRuleTab() {
|
|||
});
|
||||
}
|
||||
|
||||
function securityGroupClearIngressRuleTab() {
|
||||
var $thisTab = $("#right_panel_content").find("#tab_content_ingressrule");
|
||||
$thisTab.find("#tab_container").empty();
|
||||
}
|
||||
|
||||
function securityGroupIngressRuleJSONToTemplate(jsonObj, $template) {
|
||||
$template.data("jsonObj", jsonObj);
|
||||
$template.attr("id", "securitygroup_ingressRule_"+fromdb(jsonObj.id));
|
||||
|
|
|
|||
Loading…
Reference in New Issue