mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-26 06:30:06 -05:00
Ensure that dashboard graph API is not called after the panel has been closed. Fixes #7518
This commit is contained in:
1 parent
6bebce7015
commit
e59471d87d
5 files changed
+18
-2
No files matched your search
@@ -797,7 +797,7 @@ export default function Dashboard({
|
||||
preferences={preferences}
|
||||
sid={sid}
|
||||
did={did}
|
||||
pageVisible={true}
|
||||
pageVisible={props.panelVisible}
|
||||
></Graphs>
|
||||
)}
|
||||
{!_.isUndefined(preferences) && preferences.show_activity && (
|
||||
@@ -887,6 +887,7 @@ Dashboard.propTypes = {
|
||||
row: PropTypes.object,
|
||||
serverConnected: PropTypes.bool,
|
||||
dbConnected: PropTypes.bool,
|
||||
panelVisible: PropTypes.bool,
|
||||
};
|
||||
|
||||
export function ChartContainer(props) {
|
||||
|
||||
@@ -179,6 +179,9 @@ export default function Graphs({preferences, sid, did, pageVisible, enablePoll=t
|
||||
});
|
||||
|
||||
let path = getStatsUrl(sid, did, getFor);
|
||||
if (!pageVisible){
|
||||
return;
|
||||
}
|
||||
axios.get(path)
|
||||
.then((resp)=>{
|
||||
let data = resp.data;
|
||||
|
||||
Reference in new issue
Block a user