Ensure the scratch pad in the Query Tool is not restored after it is closed. #9007

Update the documentation for parameters that require file paths. #9008
pull/9013/head
Yogesh Mahajan 2025-07-31 17:24:27 +05:30 committed by GitHub
parent 3b9359945e
commit 1f7fbb91f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View File

@ -195,3 +195,5 @@ The following example shows both a minimally defined and a fully defined server:
} }
} }
} }
.. note:: If you're running pgAdmin in Server Mode, the values for parameters that require file paths should be specified relative to the user's home directory which is /<DATA_DIR>/storage/<user_id>/. If DATA_DIR is not specified, then it will /var/libe/pgadmin/storage/<user_id>/

View File

@ -82,7 +82,7 @@ define('pgadmin.browser.utils',
]; ];
pgBrowser.utils = { pgBrowser.utils = {
layout: {{ layout }}, layout: {{ layout|tojson }},
theme: '{{ theme }}', theme: '{{ theme }}',
pg_help_path: '{{ pg_help_path }}', pg_help_path: '{{ pg_help_path }}',
app_name: '{{ app_name }}', app_name: '{{ app_name }}',

View File

@ -124,7 +124,7 @@ function Layouts({browser}) {
}} }}
defaultLayout={defaultLayout} defaultLayout={defaultLayout}
layoutId='Browser/Layout' layoutId='Browser/Layout'
savedLayout={pgAdmin.Browser.utils.layout} savedLayout={pgAdmin.Browser.utils.layout['Browser/Layout']}
groups={{ groups={{
'object-explorer': objectExplorerGroup, 'object-explorer': objectExplorerGroup,
'playground': getMorePanelGroup(defaultTabsData), 'playground': getMorePanelGroup(defaultTabsData),
@ -143,7 +143,7 @@ function Layouts({browser}) {
}} }}
defaultLayout={item.layout} defaultLayout={item.layout}
layoutId={`Workspace/Layout-${item.workspace}`} layoutId={`Workspace/Layout-${item.workspace}`}
savedLayout={pgAdmin.Browser.utils.layout} savedLayout={pgAdmin.Browser.utils.layout[`Workspace/Layout-${item.workspace}`]}
groups={{ groups={{
'playground': item?.tabsData ? getMorePanelGroup(item?.tabsData) : {...getDefaultGroup()}, 'playground': item?.tabsData ? getMorePanelGroup(item?.tabsData) : {...getDefaultGroup()},
}} }}

View File

@ -219,9 +219,9 @@ export class LayoutDocker {
} }
} }
loadLayout(savedLayout, layoutId) { loadLayout(savedLayout) {
try { try {
this.layoutObj.loadLayout(JSON.parse(savedLayout[layoutId])); this.layoutObj.loadLayout(JSON.parse(savedLayout));
} catch { } catch {
/* Fallback to default */ /* Fallback to default */
this.layoutObj.loadLayout(this.defaultLayout); this.layoutObj.loadLayout(this.defaultLayout);
@ -529,7 +529,7 @@ export default function Layout({groups, noContextGroups, getLayoutInstance, layo
if(obj) { if(obj) {
layoutDockerObj.layoutObj = obj; layoutDockerObj.layoutObj = obj;
getLayoutInstance?.(layoutDockerObj); getLayoutInstance?.(layoutDockerObj);
layoutDockerObj.loadLayout(savedLayout, layoutId); layoutDockerObj.loadLayout(savedLayout);
} }
}} }}
loadTab={loadTab} loadTab={loadTab}
@ -565,7 +565,7 @@ Layout.propTypes = {
noContextGroups: PropTypes.array, noContextGroups: PropTypes.array,
getLayoutInstance: PropTypes.func, getLayoutInstance: PropTypes.func,
layoutId: PropTypes.string, layoutId: PropTypes.string,
savedLayout: PropTypes.any, savedLayout: PropTypes.string,
resetToTabPanel: PropTypes.string, resetToTabPanel: PropTypes.string,
enableToolEvents: PropTypes.bool, enableToolEvents: PropTypes.bool,
isLayoutVisible: PropTypes.bool isLayoutVisible: PropTypes.bool