public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries
@ 2022-04-27 12:39 Pradip Parkale <[email protected]>
2022-04-28 06:43 ` Re: [pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries Akshay Joshi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Pradip Parkale @ 2022-04-27 12:39 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
Please find the attached patch for #7305 Dashboard Server Activity showing
old queries as active, not always showing current queries.
As well, I fixed the issue where the value of the search was resetting
after clicking the checkbox
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM7305.patch (2.1K, 3-RM7305.patch)
download | inline diff:
diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx
index ebf4c082b..384c6ce91 100644
--- a/web/pgadmin/dashboard/static/js/Dashboard.jsx
+++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx
@@ -353,18 +353,16 @@ export default function Dashboard({
onClick={(e) => {
e.preventDefault();
row.toggleRowExpanded(!row.isExpanded);
- if(!(row.id in schemaDict)){
- let schema = new ActiveQuery({
- query: row.original.query,
- backend_type: row.original.backend_type,
- state_change: row.original.state_change,
- query_start: row.original.query_start,
- });
- setSchemaDict(prevState => ({
- ...prevState,
- [row.id]: schema
- }));
- }
+ let schema = new ActiveQuery({
+ query: row.original.query,
+ backend_type: row.original.backend_type,
+ state_change: row.original.state_change,
+ query_start: row.original.query_start,
+ });
+ setSchemaDict(prevState => ({
+ ...prevState,
+ [row.id]: schema
+ }));
}}
disabled={!canEditRow}
aria-label="View the active session details"
diff --git a/web/pgadmin/static/js/components/PgTable.jsx b/web/pgadmin/static/js/components/PgTable.jsx
index b3e99f740..2dfec657f 100644
--- a/web/pgadmin/static/js/components/PgTable.jsx
+++ b/web/pgadmin/static/js/components/PgTable.jsx
@@ -228,12 +228,12 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, ..
const tableRef = React.useRef();
const rowHeights = React.useRef({});
- // Reset Search vakue in tab changed.
+ // Reset Search vakue on tab changes.
React.useEffect(()=>{
setSearchVal('');
rowHeights.current = {};
tableRef.current?.resetAfterIndex(0);
- }, [columns]);
+ }, [data]);
function getRowHeight(index) {
return rowHeights.current[index] || ROW_HEIGHT;
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries
2022-04-27 12:39 [pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries Pradip Parkale <[email protected]>
@ 2022-04-28 06:43 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2022-04-28 06:43 UTC (permalink / raw)
To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied
On Wed, Apr 27, 2022 at 6:10 PM Pradip Parkale <
[email protected]> wrote:
> Hi Hackers,
>
> Please find the attached patch for #7305 Dashboard Server Activity showing
> old queries as active, not always showing current queries.
>
> As well, I fixed the issue where the value of the search was resetting
> after clicking the checkbox
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-04-28 06:43 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 12:39 [pgAdmin][RM7305]: Dashboard Server Activity showing old queries as active, not always showing current queries Pradip Parkale <[email protected]>
2022-04-28 06:43 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox