-
Notifications
You must be signed in to change notification settings - Fork 736
Ensure worspaces/pgadmin state is saved on abrupt shutdown of pgadmin.#GH_3319 #8671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ae9bd5f
to
7441c9e
Compare
c2980a1
to
2b23a35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GUI Review Comments:
-
When opening pgAdmin again in the browser Default Workspace should be in focus. Open Schema Diff tool and refresh the browser.
-
PSQL tools database name not showing in the single line on reopening pgAdmin.
-
Delete all the states from the table if the user changes the preferences and sets them to False.
-
Getting error AttributeError: 'NoneType' object has no attribute 'connection' in line 604, in _get_database_role psql/init.py
-
params['db'] = underscore_escape(data['db_name']) TypeError: 'NoneType' object is not subscriptable in line 104 in psql/init.py
-
Open Query Tool/PSQL in the respective workspace and then refresh the browser. It opens in the Default workspace, which seems to be correct, but we need to document this behaviour.
-
Query Tool/PSQL for adHoc servers are still opening with error. We should not store state of the adHoc server.
-
The show_query_tool.js, show_erd_tool.js, showSchemaDiffTool.js and show_psql_tool.js files have duplicate code to open the respective tools. We can easily make some part of the logic generic.
-
Why file name 'showSchemaDiffTool.js' different in respect to others like show_query_tool.js
-
Documentation/Screenshot updates are missing for Preferences.
-
Create a new .rst file to explain this new feature.
-
Add comments in the new function added in this PR and wherever needed in the code, so that others can understand the logic.
web/regression/feature_tests/xss_checks_panels_and_query_tool_test.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we handled the case where a server is removed?
web/pgadmin/tools/erd/static/js/erd_tool/components/ERDTool.jsx
Outdated
Show resolved
Hide resolved
web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffCompare.jsx
Outdated
Show resolved
Hide resolved
web/pgadmin/tools/sqleditor/static/js/components/sections/Query.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last time I had asked if the connection was removed. Open query tool, disconnect server, remove the server and close the query tool.
Also, what happens to open files?
web/pgadmin/tools/erd/static/js/erd_tool/components/ERDTool.jsx
Outdated
Show resolved
Hide resolved
web/pgadmin/tools/erd/static/js/erd_tool/components/ERDTool.jsx
Outdated
Show resolved
Hide resolved
web/pgadmin/tools/erd/static/js/erd_tool/components/MainToolBar.jsx
Outdated
Show resolved
Hide resolved
f9245e4
to
e318d8c
Compare
e7ec379
to
fbb8c28
Compare
fbb8c28
to
c7f294c
Compare
connection_info = data['connection_info'] \ | ||
if 'connection_info' in data else None | ||
if 'open_file_name' in connection_info and connection_info['open_file_name'] and 'is_editor_dirty' in connection_info and connection_info['is_editor_dirty']: | ||
last_saved_file_hash = compute_sha256_large_file(connection_info['open_file_name']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will this work in server mode? I mean the path structure is different on server mode.
@@ -56,6 +59,18 @@ export default function ToolView({dockerObj}) { | |||
// Handler here will return which layout instance the tool should go in | |||
// case of workspace layout. | |||
let handler = pgAdmin.Browser.getDockerHandler?.(panelId, dockerObj); | |||
const deregisterRemove = handler.docker.eventBus.registerListener(LAYOUT_EVENTS.REMOVE, (closePanelId)=>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets move the callback to appstateprovider file.
No description provided.