mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where user is not able to cancel or terminate active queries from dashboard. #7078
This commit is contained in:
parent
e837de5e8f
commit
fd8af4034a
@ -695,6 +695,8 @@ function Dashboard({
|
||||
? treeNodeInfo.server.user.can_signal_backend
|
||||
: false;
|
||||
|
||||
let maintenanceActiveSessions = dashData.filter((data) => data.state === 'active'&&
|
||||
maintenance_database === data.datname);
|
||||
if (
|
||||
treeNodeInfo.server &&
|
||||
treeNodeInfo.server.user &&
|
||||
@ -727,7 +729,8 @@ function Dashboard({
|
||||
// If it is the last active connection on maintenance db then error out
|
||||
} else if (
|
||||
maintenance_database == row.original.datname &&
|
||||
row.original.state == 'active'
|
||||
row.original.state == 'active' &&
|
||||
maintenanceActiveSessions.length === 1
|
||||
) {
|
||||
if (is_cancel_session) {
|
||||
txtMessage = gettext(
|
||||
|
Loading…
Reference in New Issue
Block a user