Skip to content

Commit f98a74b

Browse files
Fixed an issue where the user management tab is not opening in the classic layout. #8651
1 parent 8a0eae2 commit f98a74b

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

web/pgadmin/misc/workspaces/static/js/WorkspaceProvider.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ export function WorkspaceProvider({children}) {
3737
pgAdmin.Browser.docker.schema_diff_workspace = pgAdmin.Browser.docker.default_workspace;
3838
}
3939

40-
pgAdmin.Browser.getDockerHandler = (panelId)=>{
40+
pgAdmin.Browser.getDockerHandler = (panelId, classicDocker)=>{
4141
let docker;
4242
let workspace;
4343
if (isClassic) {
44-
return undefined;
44+
return {
45+
docker: classicDocker,
46+
focus: ()=>{},
47+
};
4548
}
4649

4750
const wsConfig = config.find((i)=>panelId.indexOf(i.panel)>=0);

web/pgadmin/static/js/ToolView.jsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,7 @@ export default function ToolView({dockerObj}) {
5555
} else {
5656
// Handler here will return which layout instance the tool should go in
5757
// case of workspace layout.
58-
let handler = pgAdmin.Browser.getDockerHandler?.(panelId);
59-
if(!handler) {
60-
handler = {
61-
docker: dockerObj,
62-
focus: ()=>{},
63-
};
64-
}
58+
let handler = pgAdmin.Browser.getDockerHandler?.(panelId, dockerObj);
6559
handler.focus();
6660
handler.docker.openTab({
6761
id: panelId,

web/pgadmin/tools/user_management/static/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class UserManagement {
4242

4343
// This is a callback function to show user management tab.
4444
launchUserManagement() {
45-
let handler = pgAdmin.Browser.getDockerHandler?.(BROWSER_PANELS.USER_MANAGEMENT);
45+
let handler = pgAdmin.Browser.getDockerHandler?.(BROWSER_PANELS.USER_MANAGEMENT, pgAdmin.Browser.docker.default_workspace);
4646
handler.focus();
4747
handler.docker.openTab({
4848
id: BROWSER_PANELS.USER_MANAGEMENT,

0 commit comments

Comments
 (0)