pgAdmin 4 commit: Port preferences dialog to React. Fixes #7149

2022-03-21 Thread Akshay Joshi
Port preferences dialog to React. Fixes #7149

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=74e794b4162b771f3ada4cf631bdbe0b43cab91b
Author: Nikhil Mohite 

Modified Files
--
docs/en_US/images/preferences_browser_display.png  | Bin 179173 -> 180159 bytes
.../preferences_browser_keyboard_shortcuts.png | Bin 169108 -> 182931 bytes
docs/en_US/images/preferences_browser_nodes.png| Bin 127965 -> 117746 bytes
.../images/preferences_browser_properties.png  | Bin 98747 -> 98006 bytes
.../images/preferences_browser_tab_settings.png| Bin 242214 -> 218830 bytes
.../en_US/images/preferences_dashboard_display.png | Bin 159705 -> 160834 bytes
docs/en_US/images/preferences_dashboard_graphs.png | Bin 138376 -> 140864 bytes
docs/en_US/images/preferences_debugger_display.png | Bin 133908 -> 0 bytes
.../preferences_debugger_keyboard_shortcuts.png| Bin 129497 -> 145405 bytes
.../images/preferences_erd_keyboard_shortcuts.png  | Bin 0 -> 171696 bytes
docs/en_US/images/preferences_misc_themes.png  | Bin 112101 -> 122935 bytes
.../images/preferences_misc_user_language.png  | Bin 79006 -> 78854 bytes
docs/en_US/images/preferences_paths_binary.png | Bin 242831 -> 251426 bytes
docs/en_US/images/preferences_paths_help.png   | Bin 132819 -> 99384 bytes
docs/en_US/images/preferences_schema_diff.png  | Bin 119685 -> 118589 bytes
.../images/preferences_sql_auto_completion.png | Bin 95318 -> 89668 bytes
docs/en_US/images/preferences_sql_csv_output.png   | Bin 121212 -> 117730 bytes
docs/en_US/images/preferences_sql_display.png  | Bin 148088 -> 151244 bytes
docs/en_US/images/preferences_sql_editor.png   | Bin 221825 -> 196744 bytes
docs/en_US/images/preferences_sql_explain.png  | Bin 103846 -> 91462 bytes
docs/en_US/images/preferences_sql_formatting.png   | Bin 263141 -> 184540 bytes
.../images/preferences_sql_keyboard_shortcuts.png  | Bin 125560 -> 127110 bytes
docs/en_US/images/preferences_sql_options.png  | Bin 235207 -> 187799 bytes
docs/en_US/images/preferences_sql_results_grid.png | Bin 150806 -> 152498 bytes
docs/en_US/images/preferences_storage_options.png  | Bin 100482 -> 94404 bytes
docs/en_US/preferences.rst |  12 +
docs/en_US/release_notes_6_8.rst   |   2 +-
web/package.json   |   7 +-
.../browser/register_browser_preferences.py|   4 +-
.../servers/static/js/binary_path.ui.js|  71 +++
web/pgadmin/misc/__init__.py   |  10 +-
web/pgadmin/misc/file_manager/__init__.py  |  10 +-
web/pgadmin/preferences/__init__.py| 138 +++--
.../static/js/components/PreferencesComponent.jsx  | 599 ++
.../static/js/components/PreferencesTree.jsx   |  68 +++
web/pgadmin/preferences/static/js/index.js |  21 +
web/pgadmin/preferences/static/js/preferences.js   | 671 ++---
web/pgadmin/preferences/tests/__init__.py  |   8 +
.../preferences/tests/preferences_test_data.json   |  27 +
.../preferences/tests/test_preferences_get.py  |  39 ++
.../preferences/tests/test_preferences_update.py   |  60 ++
web/pgadmin/static/img/fonticon/expand.svg |   1 +
.../static/img/fonticon/minimize_collapse.svg  |   1 +
web/pgadmin/static/js/SchemaView/DataGridView.jsx  |  12 +-
web/pgadmin/static/js/SchemaView/MappedControl.jsx |  85 ++-
web/pgadmin/static/js/SchemaView/index.jsx |  10 +-
web/pgadmin/static/js/components/ExternalIcon.jsx  |   6 +-
.../static/js/components/FormComponents.jsx| 421 -
.../static/js/components/KeyboardShortcuts.jsx | 130 
.../static/js/components/QueryThresholds.jsx   |  90 +++
web/pgadmin/static/js/components/Themes.jsx|  58 ++
web/pgadmin/static/js/helpers/ModalProvider.jsx| 165 -
web/pgadmin/static/js/helpers/Notifier.jsx |  46 +-
web/pgadmin/static/js/tree/preference_nodes.ts | 247 
web/pgadmin/static/js/tree/preferences_tree.tsx|  53 ++
web/pgadmin/static/js/tree/tree.js | 152 ++---
web/pgadmin/static/scss/_alertify.overrides.scss   |   3 +
.../sqleditor/utils/query_tool_preferences.py  |  20 +-
web/pgadmin/utils/preferences.py   |  30 +-
.../components/KeyboardShortcuts.spec.js   | 100 +++
.../javascript/components/QueryThreshold.spec.js   |  86 +++
.../javascript/components/Themes.spec.js   |  96 +++
.../schema_ui_files/binary_path.ui.spec.js |  47 ++
web/webpack.shim.js|   2 +-
web/yarn.lock  |  70 ++-
65 files changed, 2659 insertions(+), 1019 deletions(-)



Re: [pgAdmin][RM-7149]: [React] Port preferences dialog to React.

2022-03-21 Thread Akshay Joshi
Thanks, the patch applied. Screenshots are still not the latest. Take all
the screenshots with the latest changes and send them back.

On Mon, Mar 21, 2022 at 10:00 AM Nikhil Mohite <
nikhil.moh...@enterprisedb.com> wrote:

> Hi Akshay,
>
> PFA patch v2 resolved all the review comments.
>
> On Wed, Mar 9, 2022 at 5:48 PM Akshay Joshi 
> wrote:
>
>> Hi Nikhil
>>
>> Below are the review comments:
>> *GUI:*
>>
>>- By default, all nodes should be expanded, and at least one node
>>should be selected (Check existing behavior).
>>- Reduce the space between the expand/collapse (>) icon and the
>>tress node label. It is most likely icons that are taking up that space.
>>- Unable to select parent node. With old behavior when we select the
>>parent node its immediate first child is selected and the appropriate page
>>is displayed on the right side.
>>- The maximize button should be consistent with all other dialogs.
>>- Maximize not working properly, move the dialog bit up, and then
>>click Maximize button, dialog is not visible correctly.
>>- The help button is missing at the bottom.
>>- A documentation update is missing.
>>- Keyboard Shortcuts (Browser, Debugger, Query Tool, and ERD Tool) *Fix
>>for all*
>>   - Between the 'Key' label and control, there should be a margin.
>>   - Reduce the width of the key control.
>>   - The key control loses focus when the key is pressed. Verify old
>>   behavior.
>>- Nodes: Can we add a message or label at the top about settings?
>>Previously, we had a switch control with a 'Show/Hide' label that was 
>> clear
>>to the end-user.
>>- Dashboard -> Display -> Long-running query thresholds:
>>   - Between the 'Warning'/'Alert' label and their control, there
>>   should be a margin.
>>   - There is no '*in minutes*' label at the end.
>>- Miscellaneous -> Themes: Themes preview is not visible.
>>- Binary Paths:
>>   - 'Set as default' should be disabled until a path is provided.
>>   - 'Set as default' must be a radio button, only one binary path
>>   can be set to default not all.
>>   - Unable to select binary path as select dialog is hidden behind
>>   the preferences dialog. It seems the preferences dialog is the modal 
>> dialog.
>>   - Adjust the validation icon properly, space should not be there
>>   at the end.
>>   - [image: Screenshot 2022-03-09 at 4.34.08 PM.png]
>>- Query Tool: CSV/TXT Output node should be after Auto completion.
>>- Browser -> Tab settings and Storage -> Options have identical right
>>side page. Remove the controls appropriately.
>>
>>  I tried but was unable to reproduce the issue.
>
>>
>> *Code:*
>>
>>- Add comments/function header for all the new functions created.
>>
>>
>> On Mon, Mar 7, 2022 at 5:54 PM Nikhil Mohite <
>> nikhil.moh...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find attached the patch for RM-7149
>>> : [React] Port preferences
>>> dialog to React.
>>>
>>> --
>>> *Thanks & Regards,*
>>> *Nikhil Mohite*
>>> *Senior Software Engineer.*
>>> *EDB Postgres* 
>>> *Mob.No: +91-7798364578.*
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres *
>>
>> *Mobile: +91 976-788-8246*
>>
>
> Regards,
> Nikhil Mohite
>


-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres *

*Mobile: +91 976-788-8246*


Re: pgAdmin 4 commit: Port preferences dialog to React. Fixes #7149

2022-03-21 Thread Aditya Toshniwal
Hi Nikhil,

You have called a ReactDOM.render inside a React component. ReactDOM.render
is used only to mount the top React component.
I remember we had discussed this and I told you to change. This may lead to
unpredictable behaviour.

Please change it.

On Mon, Mar 21, 2022 at 1:30 PM Akshay Joshi 
wrote:

> Port preferences dialog to React. Fixes #7149
>
> Branch
> --
> master
>
> Details
> ---
>
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=74e794b4162b771f3ada4cf631bdbe0b43cab91b
> Author: Nikhil Mohite 
>
> Modified Files
> --
> docs/en_US/images/preferences_browser_display.png  | Bin 179173 -> 180159
> bytes
> .../preferences_browser_keyboard_shortcuts.png | Bin 169108 -> 182931
> bytes
> docs/en_US/images/preferences_browser_nodes.png| Bin 127965 -> 117746
> bytes
> .../images/preferences_browser_properties.png  | Bin 98747 -> 98006
> bytes
> .../images/preferences_browser_tab_settings.png| Bin 242214 -> 218830
> bytes
> .../en_US/images/preferences_dashboard_display.png | Bin 159705 -> 160834
> bytes
> docs/en_US/images/preferences_dashboard_graphs.png | Bin 138376 -> 140864
> bytes
> docs/en_US/images/preferences_debugger_display.png | Bin 133908 -> 0 bytes
> .../preferences_debugger_keyboard_shortcuts.png| Bin 129497 -> 145405
> bytes
> .../images/preferences_erd_keyboard_shortcuts.png  | Bin 0 -> 171696 bytes
> docs/en_US/images/preferences_misc_themes.png  | Bin 112101 -> 122935
> bytes
> .../images/preferences_misc_user_language.png  | Bin 79006 -> 78854
> bytes
> docs/en_US/images/preferences_paths_binary.png | Bin 242831 -> 251426
> bytes
> docs/en_US/images/preferences_paths_help.png   | Bin 132819 -> 99384
> bytes
> docs/en_US/images/preferences_schema_diff.png  | Bin 119685 -> 118589
> bytes
> .../images/preferences_sql_auto_completion.png | Bin 95318 -> 89668
> bytes
> docs/en_US/images/preferences_sql_csv_output.png   | Bin 121212 -> 117730
> bytes
> docs/en_US/images/preferences_sql_display.png  | Bin 148088 -> 151244
> bytes
> docs/en_US/images/preferences_sql_editor.png   | Bin 221825 -> 196744
> bytes
> docs/en_US/images/preferences_sql_explain.png  | Bin 103846 -> 91462
> bytes
> docs/en_US/images/preferences_sql_formatting.png   | Bin 263141 -> 184540
> bytes
> .../images/preferences_sql_keyboard_shortcuts.png  | Bin 125560 -> 127110
> bytes
> docs/en_US/images/preferences_sql_options.png  | Bin 235207 -> 187799
> bytes
> docs/en_US/images/preferences_sql_results_grid.png | Bin 150806 -> 152498
> bytes
> docs/en_US/images/preferences_storage_options.png  | Bin 100482 -> 94404
> bytes
> docs/en_US/preferences.rst |  12 +
> docs/en_US/release_notes_6_8.rst   |   2 +-
> web/package.json   |   7 +-
> .../browser/register_browser_preferences.py|   4 +-
> .../servers/static/js/binary_path.ui.js|  71 +++
> web/pgadmin/misc/__init__.py   |  10 +-
> web/pgadmin/misc/file_manager/__init__.py  |  10 +-
> web/pgadmin/preferences/__init__.py| 138 +++--
> .../static/js/components/PreferencesComponent.jsx  | 599 ++
> .../static/js/components/PreferencesTree.jsx   |  68 +++
> web/pgadmin/preferences/static/js/index.js |  21 +
> web/pgadmin/preferences/static/js/preferences.js   | 671
> ++---
> web/pgadmin/preferences/tests/__init__.py  |   8 +
> .../preferences/tests/preferences_test_data.json   |  27 +
> .../preferences/tests/test_preferences_get.py  |  39 ++
> .../preferences/tests/test_preferences_update.py   |  60 ++
> web/pgadmin/static/img/fonticon/expand.svg |   1 +
> .../static/img/fonticon/minimize_collapse.svg  |   1 +
> web/pgadmin/static/js/SchemaView/DataGridView.jsx  |  12 +-
> web/pgadmin/static/js/SchemaView/MappedControl.jsx |  85 ++-
> web/pgadmin/static/js/SchemaView/index.jsx |  10 +-
> web/pgadmin/static/js/components/ExternalIcon.jsx  |   6 +-
> .../static/js/components/FormComponents.jsx| 421 -
> .../static/js/components/KeyboardShortcuts.jsx | 130 
> .../static/js/components/QueryThresholds.jsx   |  90 +++
> web/pgadmin/static/js/components/Themes.jsx|  58 ++
> web/pgadmin/static/js/helpers/ModalProvider.jsx| 165 -
> web/pgadmin/static/js/helpers/Notifier.jsx |  46 +-
> web/pgadmin/static/js/tree/preference_nodes.ts | 247 
> web/pgadmin/static/js/tree/preferences_tree.tsx|  53 ++
> web/pgadmin/static/js/tree/tree.js | 152 ++---
> web/pgadmin/static/scss/_alertify.overrides.scss   |   3 +
> .../sqleditor/utils/query_tool_preferences.py  |  20 +-
> web/pgadmin/utils/preferences.py   |  30 +-
> .../components/KeyboardShortcuts.spec.js   | 100 +++
> .../javascript/components/QueryThreshold.spec.js   |  86 +++
> .../javascript/components/Themes.spec.js 

pgAdmin 4 commit: Support running the container under OpenShift with al

2022-03-21 Thread Dave Page
Support running the container under OpenShift with alternate UIDs. Fixes #7257

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e7dc6df7230c9ccc74bf9853fb614407b861a42a

Modified Files
--
Dockerfile   | 13 -
docs/en_US/release_notes_6_8.rst |  1 +
pkg/docker/entrypoint.sh |  9 +
3 files changed, 18 insertions(+), 5 deletions(-)