From d0e609076166947cada0f395ffbc14f4763e554e Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Wed, 24 Jul 2024 13:45:52 +0530 Subject: [PATCH] Fix Dashboard State refresh issue with the active sessions only. --- web/pgadmin/dashboard/static/js/Dashboard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index e9aa4a352..506595666 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -930,7 +930,7 @@ function Dashboard({ }, [nodeData, treeNodeInfo, prefStore, refresh, mainTabVal, logCol, logFormat]); const filteredDashData = useMemo(()=>{ - if (mainTabVal == 1 && activeOnly) { + if (mainTabVal == 1 && activeOnly && dashData.length > 0) { // we want to show 'idle in transaction', 'active', 'active in transaction', and future non-blank, non-"idle" status values return dashData[0]['activity'].filter((r)=>(r.state && r.state != '' && r.state != 'idle')); }