Fixed an issue where the Dashboard Server Activity was showing old queries as active. Fixes #7305

This commit is contained in:
Pradip Parkale 2022-04-28 12:10:42 +05:30 committed by Akshay Joshi
parent 6e2ee9a21f
commit 7c61017f57
3 changed files with 13 additions and 14 deletions

View File

@ -40,6 +40,7 @@ Bug fixes
| `Issue #7294 <https://redmine.postgresql.org/issues/7294>`_ - Fixed an issue where the copy and paste row does not work if the first column contains no data.
| `Issue #7296 <https://redmine.postgresql.org/issues/7296>`_ - Ensure that after deleting multiple objects from the properties panel, the browser tree should be refreshed.
| `Issue #7299 <https://redmine.postgresql.org/issues/7299>`_ - Fixed sorting issue in the statistics panel.
| `Issue #7305 <https://redmine.postgresql.org/issues/7305>`_ - Fixed an issue where the Dashboard Server Activity was showing old queries as active.
| `Issue #7307 <https://redmine.postgresql.org/issues/7307>`_ - Fixed an issue where the table showed duplicate columns when creating multiple sequences on the same column.
| `Issue #7308 <https://redmine.postgresql.org/issues/7308>`_ - Ensure that sorting should be preserved on refresh for Server Activity.
| `Issue #7322 <https://redmine.postgresql.org/issues/7322>`_ - Fixed an issue while creating a new database throwing an error that failed to retrieve data.

View File

@ -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"

View File

@ -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 value on tab changes.
React.useEffect(()=>{
setSearchVal('');
rowHeights.current = {};
tableRef.current?.resetAfterIndex(0);
}, [columns]);
}, [data]);
function getRowHeight(index) {
return rowHeights.current[index] || ROW_HEIGHT;