Ensure that dashboard graph API is not called after the panel has been closed. Fixes #7518

This commit is contained in:
Pradip Parkale authored and Akshay Joshi committed 2022-07-04 12:03:18 +05:30
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;