1) Enable the ability to close the 'Welcome' tab in the Query Tool/PSQL Workspace. #8436
2) Fixed an issue where the User Management and Change Password dialogs were hidden when selecting a menu while a workspace other than 'Default' was active. #8418 3) Revert the change of OS from Ubuntu 22.04 to 24.04 for github action failure.pull/8471/head
parent
e2a80b2465
commit
96128f6a15
|
@ -22,7 +22,7 @@ jobs:
|
|||
matrix:
|
||||
pgver: [13, 14, 15, 16, 17]
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
@ -21,6 +21,7 @@ New features
|
|||
************
|
||||
|
||||
| `Issue #5128 <https://github.com/pgadmin-org/pgadmin4/issues/5128>`_ - Add support for one to one relationship in the ERD tool.
|
||||
| `Issue #8436 <https://github.com/pgadmin-org/pgadmin4/issues/8436>`_ - Enable the ability to close the 'Welcome' tab in the Query Tool/PSQL Workspace.
|
||||
|
||||
Housekeeping
|
||||
************
|
||||
|
@ -30,5 +31,8 @@ Bug fixes
|
|||
*********
|
||||
|
||||
| `Issue #8181 <https://github.com/pgadmin-org/pgadmin4/issues/8181>`_ - Fixed an issue where pgAdmin does not support pg_vector column length/precision.
|
||||
| `Issue #8296 <https://github.com/pgadmin-org/pgadmin4/issues/8296>`_ - Fixed an issue where pasting text containing JSON data into the query tool grid would result in incorrect parsing.
|
||||
| `Issue #8341 <https://github.com/pgadmin-org/pgadmin4/issues/8341>`_ - Fixed an issue where the query tool was not treating IDENTITY columns as columns with default values when inserting new rows.
|
||||
| `Issue #8410 <https://github.com/pgadmin-org/pgadmin4/issues/8410>`_ - Fixed Docker image entrypoint.sh email validation.
|
||||
| `Issue #8389 <https://github.com/pgadmin-org/pgadmin4/issues/8389>`_ - Fixed an issue where the ERD tool fails to open a saved file containing parent-child relationship within the same table.
|
||||
| `Issue #8410 <https://github.com/pgadmin-org/pgadmin4/issues/8410>`_ - Fixed Docker image entrypoint.sh email validation.
|
||||
| `Issue #8418 <https://github.com/pgadmin-org/pgadmin4/issues/8418>`_ - Fixed an issue where the User Management and Change Password dialogs were hidden when selecting a menu while a workspace other than 'Default' was active.
|
|
@ -88,10 +88,14 @@ export function WorkspaceProvider({children}) {
|
|||
|
||||
const hasOpenTabs = (forWs)=>{
|
||||
const wsConfig = config.find((i)=>i.workspace == forWs);
|
||||
if (wsConfig?.enableOnNoTabs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(wsConfig) {
|
||||
return Boolean(pgAdmin.Browser.docker[wsConfig.docker]?.layoutObj?.getLayout()?.dockbox?.children?.[0]?.tabs?.length);
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
const getLayoutObj = (forWs)=>{
|
||||
|
|
|
@ -11,20 +11,23 @@ import gettext from 'sources/gettext';
|
|||
import { BROWSER_PANELS, WORKSPACES } from '../../../../browser/static/js/constants';
|
||||
import WorkspaceWelcomePage from './WorkspaceWelcomePage';
|
||||
import React from 'react';
|
||||
import { LayoutDocker } from '../../../../static/js/helpers/Layout';
|
||||
|
||||
const welcomeQueryToolPanelData = {
|
||||
id: BROWSER_PANELS.WELCOME_QUERY_TOOL, title: gettext('Welcome'), content: <WorkspaceWelcomePage mode={WORKSPACES.QUERY_TOOL} />, closable: false, group: 'playground'
|
||||
};
|
||||
const welcomeQueryToolPanelData = [{
|
||||
id: BROWSER_PANELS.WELCOME_QUERY_TOOL, title: gettext('Welcome'), content: <WorkspaceWelcomePage mode={WORKSPACES.QUERY_TOOL} />, closable: true, group: 'playground'
|
||||
}];
|
||||
|
||||
const welcomePSQLPanelData = {
|
||||
id: BROWSER_PANELS.WELCOME_PSQL_TOOL, title: gettext('Welcome'), content: <WorkspaceWelcomePage mode={WORKSPACES.PSQL_TOOL} />, closable: false, group: 'playground'
|
||||
};
|
||||
const welcomePSQLPanelData = [{
|
||||
id: BROWSER_PANELS.WELCOME_PSQL_TOOL, title: gettext('Welcome'), content: <WorkspaceWelcomePage mode={WORKSPACES.PSQL_TOOL} />, closable: true, group: 'playground'
|
||||
}];
|
||||
|
||||
export const config = [
|
||||
{
|
||||
docker: 'query_tool_workspace',
|
||||
panel: BROWSER_PANELS.QUERY_TOOL,
|
||||
workspace: WORKSPACES.QUERY_TOOL,
|
||||
tabsData: welcomeQueryToolPanelData,
|
||||
enableOnNoTabs: true,
|
||||
layout: {
|
||||
dockbox: {
|
||||
mode: 'vertical',
|
||||
|
@ -36,7 +39,7 @@ export const config = [
|
|||
size: 100,
|
||||
id: BROWSER_PANELS.MAIN,
|
||||
group: 'playground',
|
||||
tabs: [welcomeQueryToolPanelData],
|
||||
tabs: welcomeQueryToolPanelData.map((t)=>LayoutDocker.getPanel(t)),
|
||||
panelLock: {panelStyle: 'playground'},
|
||||
}
|
||||
]
|
||||
|
@ -49,6 +52,8 @@ export const config = [
|
|||
docker: 'psql_workspace',
|
||||
panel: BROWSER_PANELS.PSQL_TOOL,
|
||||
workspace: WORKSPACES.PSQL_TOOL,
|
||||
tabsData: welcomePSQLPanelData,
|
||||
enableOnNoTabs: true,
|
||||
layout: {
|
||||
dockbox: {
|
||||
mode: 'vertical',
|
||||
|
@ -60,7 +65,7 @@ export const config = [
|
|||
size: 100,
|
||||
id: BROWSER_PANELS.MAIN,
|
||||
group: 'playground',
|
||||
tabs: [welcomePSQLPanelData],
|
||||
tabs: welcomePSQLPanelData.map((t)=>LayoutDocker.getPanel(t)),
|
||||
panelLock: {panelStyle: 'playground'},
|
||||
}
|
||||
]
|
||||
|
|
|
@ -41,11 +41,6 @@ const objectExplorerGroup = {
|
|||
panelExtra: () => <ObjectExplorerToolbar />
|
||||
};
|
||||
|
||||
const mainPanelGroup = {
|
||||
...getDefaultGroup(),
|
||||
panelExtra: () => <MainMoreToolbar />
|
||||
};
|
||||
|
||||
export const processesPanelData = {
|
||||
id: BROWSER_PANELS.PROCESSES, title: gettext('Processes'), content: <Processes />, closable: true, group: 'playground'
|
||||
};
|
||||
|
@ -72,6 +67,11 @@ export const defaultTabsData = [
|
|||
processesPanelData,
|
||||
];
|
||||
|
||||
const mainPanelGroup = {
|
||||
...getDefaultGroup(),
|
||||
panelExtra: () => <MainMoreToolbar tabsData={defaultTabsData}/>
|
||||
};
|
||||
|
||||
let defaultLayout = {
|
||||
dockbox: {
|
||||
mode: 'vertical',
|
||||
|
@ -132,7 +132,7 @@ function Layouts({browser}) {
|
|||
}}
|
||||
defaultLayout={item.layout}
|
||||
groups={{
|
||||
'playground': {...getDefaultGroup()},
|
||||
'playground': item?.tabsData ? {...getDefaultGroup(), panelExtra: () => <MainMoreToolbar tabsData={item.tabsData}/>} : {...getDefaultGroup()},
|
||||
}}
|
||||
resetToTabPanel={BROWSER_PANELS.MAIN}
|
||||
isLayoutVisible={currentWorkspace == item.workspace}
|
||||
|
|
|
@ -229,56 +229,53 @@ export function showChangeServerPassword() {
|
|||
}
|
||||
|
||||
export function showChangeUserPassword(url) {
|
||||
const panelId = BROWSER_PANELS.SEARCH_OBJECTS;
|
||||
const onClose = ()=>{pgAdmin.Browser.docker.default_workspace.close(panelId);};
|
||||
pgAdmin.Browser.docker.default_workspace.openDialog({
|
||||
id: panelId,
|
||||
title: gettext('Change pgAdmin User Password'),
|
||||
content: (
|
||||
<ChangePasswordContent
|
||||
getInitData={()=>{
|
||||
const api = getApiInstance();
|
||||
return new Promise((resolve, reject)=>{
|
||||
api.get(url)
|
||||
.then((res)=>{
|
||||
resolve(res.data);
|
||||
})
|
||||
.catch((err)=>{
|
||||
reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
|
||||
});
|
||||
});
|
||||
}}
|
||||
onClose={()=>{
|
||||
onClose();
|
||||
}}
|
||||
onSave={(_isNew, data)=>{
|
||||
const api = getApiInstance();
|
||||
return new Promise((resolve, reject)=>{
|
||||
const formData = {
|
||||
'password': data.password,
|
||||
'new_password': data.newPassword,
|
||||
'new_password_confirm': data.confirmPassword,
|
||||
'csrf_token': data.csrf_token
|
||||
};
|
||||
|
||||
api({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
data: formData,
|
||||
}).then((res)=>{
|
||||
resolve(res.data.info);
|
||||
onClose();
|
||||
pgAdmin.Browser.notifier.success(res.data.info);
|
||||
}).catch((err)=>{
|
||||
const title = gettext('Change pgAdmin User Password');
|
||||
pgAdmin.Browser.notifier.showModal(title, (onClose) => {
|
||||
return <ChangePasswordContent
|
||||
getInitData={()=>{
|
||||
const api = getApiInstance();
|
||||
return new Promise((resolve, reject)=>{
|
||||
api.get(url)
|
||||
.then((res)=>{
|
||||
resolve(res.data);
|
||||
})
|
||||
.catch((err)=>{
|
||||
reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
|
||||
});
|
||||
});
|
||||
}}
|
||||
onClose={()=>{
|
||||
onClose();
|
||||
}}
|
||||
onSave={(_isNew, data)=>{
|
||||
const api = getApiInstance();
|
||||
return new Promise((resolve, reject)=>{
|
||||
const formData = {
|
||||
'password': data.password,
|
||||
'new_password': data.newPassword,
|
||||
'new_password_confirm': data.confirmPassword,
|
||||
'csrf_token': data.csrf_token
|
||||
};
|
||||
|
||||
api({
|
||||
method: 'POST',
|
||||
url: url,
|
||||
data: formData,
|
||||
}).then((res)=>{
|
||||
resolve(res.data.info);
|
||||
onClose();
|
||||
pgAdmin.Browser.notifier.success(res.data.info);
|
||||
}).catch((err)=>{
|
||||
reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
|
||||
});
|
||||
}}
|
||||
hasCsrfToken={true}
|
||||
showUser={false}
|
||||
/>
|
||||
)
|
||||
}, pgAdmin.Browser.stdW.md, pgAdmin.Browser.stdH.md);
|
||||
});
|
||||
}}
|
||||
hasCsrfToken={true}
|
||||
showUser={false}
|
||||
/>;
|
||||
},
|
||||
{ isFullScreen: false, isResizeable: true, showFullScreen: false, isFullWidth: true,
|
||||
dialogWidth: pgAdmin.Browser.stdW.md, dialogHeight: pgAdmin.Browser.stdH.md});
|
||||
}
|
||||
|
||||
export function showNamedRestorePoint() {
|
||||
|
|
|
@ -14,9 +14,9 @@ import { PgIconButton } from '../components/Buttons';
|
|||
import gettext from 'sources/gettext';
|
||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||
import { BROWSER_PANELS } from '../../../browser/static/js/constants';
|
||||
import { defaultTabsData } from '../BrowserComponent';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
export default function MainMoreToolbar() {
|
||||
export default function MainMoreToolbar({tabsData}) {
|
||||
const layoutDocker = React.useContext(LayoutDockerContext);
|
||||
return (
|
||||
<Box display="flex" alignItems="center">
|
||||
|
@ -29,7 +29,7 @@ export default function MainMoreToolbar() {
|
|||
label: 'Open',
|
||||
getMenuItems: ()=>{
|
||||
const ret = [];
|
||||
defaultTabsData.forEach((t)=>{
|
||||
tabsData.forEach((t)=>{
|
||||
if(!layoutDocker.isTabOpen(t.id)) {
|
||||
ret.push({
|
||||
label: t.title,
|
||||
|
@ -51,3 +51,6 @@ export default function MainMoreToolbar() {
|
|||
</Box>
|
||||
);
|
||||
}
|
||||
MainMoreToolbar.propTypes = {
|
||||
tabsData: PropTypes.array
|
||||
};
|
|
@ -20,7 +20,6 @@ import {AUTH_METHODS} from 'pgadmin.browser.constants';
|
|||
import current_user from 'pgadmin.user_management.current_user';
|
||||
import { isEmptyString } from '../../../../static/js/validators';
|
||||
import { showChangeOwnership } from '../../../../static/js/Dialogs/index';
|
||||
import { BROWSER_PANELS } from '../../../../browser/static/js/constants';
|
||||
import _ from 'lodash';
|
||||
|
||||
const StyledBox = styled(Box)(() => ({
|
||||
|
@ -457,16 +456,13 @@ UserManagementDialog.propTypes = {
|
|||
};
|
||||
|
||||
export function showUserManagement() {
|
||||
const panelTitle = gettext('User Management');
|
||||
const panelId = BROWSER_PANELS.USER_MANAGEMENT;
|
||||
pgAdmin.Browser.docker.default_workspace.openDialog({
|
||||
id: panelId,
|
||||
title: panelTitle,
|
||||
manualClose: false,
|
||||
content: (
|
||||
<UserManagementDialog
|
||||
onClose={()=>{pgAdmin.Browser.docker.default_workspace.close(panelId);}}
|
||||
/>
|
||||
)
|
||||
}, pgAdmin.Browser.stdW.lg, pgAdmin.Browser.stdH.md);
|
||||
const title = gettext('User Management');
|
||||
|
||||
pgAdmin.Browser.notifier.showModal(title, (onClose) => {
|
||||
return <UserManagementDialog
|
||||
onClose={()=>{onClose();}}
|
||||
/>;
|
||||
},
|
||||
{ isFullScreen: false, isResizeable: true, showFullScreen: false, isFullWidth: true,
|
||||
dialogWidth: pgAdmin.Browser.stdW.lg, dialogHeight: pgAdmin.Browser.stdH.md});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue