mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that dashboard graph API is not called after the panel has been closed. Fixes #7518
This commit is contained in:
committed by
Akshay Joshi
parent
6bebce7015
commit
e59471d87d
@@ -273,6 +273,15 @@ define(
|
||||
);
|
||||
}
|
||||
}
|
||||
if (eventName == 'panelClosed' && selectedPanel._type == 'dashboard') {
|
||||
getPanelView(
|
||||
pgBrowser.tree,
|
||||
$container[0],
|
||||
pgBrowser,
|
||||
this._type,
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -24,7 +24,8 @@ export function getPanelView(
|
||||
tree,
|
||||
container,
|
||||
pgBrowser,
|
||||
panelType
|
||||
panelType,
|
||||
panelVisible = true
|
||||
) {
|
||||
let item = !_.isNull(tree)? tree.selected(): null,
|
||||
nodeData, node, treeNodeInfo, preferences, graphPref, dashPref;
|
||||
@@ -52,6 +53,7 @@ export function getPanelView(
|
||||
sid={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['server']) ? treeNodeInfo['server']._id : ''}
|
||||
serverConnected={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['server']) ? treeNodeInfo.server.connected: false}
|
||||
dbConnected={!_.isUndefined(treeNodeInfo) && !_.isUndefined(treeNodeInfo['database']) ? treeNodeInfo.database.connected: false}
|
||||
panelVisible={panelVisible}
|
||||
/>
|
||||
</Theme>,
|
||||
container
|
||||
|
||||
Reference in New Issue
Block a user