Re: Feature #5370 User should be able to set the binary path for each database server

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Feature #5370 User should be able to set the binary path for each database server
Date: 2021-06-03 14:06:57
Message-ID: CANxoLDdFaVbEd3uk_JmNp83Djdm=gEVtdtTTVqGv4KhtBYPYvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Hackers

I have almost completed the implementation of this feature as per the
discussion. Facing one wired alertify issue whenever we open the preference
dialog and scroll to the bottom of any page and then open another alertify
dialog (About) scroll bars automatically scroll to top
https://redmine.postgresql.org/issues/6506.

After creating a new RM #6506, I did some R&D and figure out that if create
Preferences dialog as a modal dialog issue is resolved. So I think there
should not be any problem to make the Preferences dialog as a modal dialog?

Please refer to the image below:
[image: Validate_2.png]

Is the above look good to you?

Regarding migrate and extend the configuration "DEFAULT_BINARY_PATHS" I
have the following questions:

- If "DEFAULT_BINARY_PATHS" is defined then, where to show this in the
grid? Can we show it to the latest database server version and make it
default?
- If you agree to the first point then what if the user has already
define another path for the latest database server version, should we
overwrite it?

On Fri, May 21, 2021 at 2:46 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi Akshay,
>
> On Fri, May 21, 2021 at 10:01 AM Akshay Joshi <
> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
>>
>>
>> On Fri, May 21, 2021 at 1:01 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> Hi Akshay,
>>>
>>> On Fri, May 21, 2021 at 8:03 AM Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Dave/Hackers
>>>>
>>>> As per your suggestion, I have created a new Backform control
>>>> "BinaryPathsGridControl" and two new BackgridCell (BackgridRadioCell and
>>>> BackgridSelectFileCell). Please refer to the screenshot below:
>>>> [image: Binary_Path.png]
>>>>
>>>> Are the above changes look good to you? The radio button will only
>>>> be enabled when there is a path. Added validate button which will validate
>>>> the Utilities (pg_dump, pg_dumpall, ...)
>>>>
>>>
>>> Nice! Just a couple of comments:
>>>
>>> - I assume the browse button is removed in server mode as discussed?
>>> Maybe we should add a config.py option to allow that behaviour to be
>>> overridden if the admin doesn't care about sandboxing?
>>>
>>
>> Yes, will take care that in server mode browse button should not be
>> visible. if the config option "ENABLE_FILE_BROWSING" is set to true then
>> only the browse button will be enabled in server mode.
>>
>
> I think the name needs to be a little more specific. How about
> ENABLE_BINARY_PATH_BROWSING?
>
>
>>
>>>
>>> - I think we need some hint text. How about something like:
>>>
>>> Enter the directory in which the psql, pg_dump, pg_dumpall, and
>>> pg_restore utilities can be found for the corresponding database server
>>> version. The default path will be used for server versions that do not have
>>> a path specified.
>>>
>>
>> I have added the hint in two ways, please refer to the screenshots
>> below and let me know your prefered one.
>> [image: Screenshot 2021-05-21 at 2.16.57 PM.png]. [image:
>> Screenshot 2021-05-21 at 2.23.50 PM.png]
>>
>
> I think having the text below is better. It's more consistent with other
> controls.
>
>
> --
> Dave Page
> Blog: https://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
>

--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2021-06-04 07:18:06 pgAdmin 4 commit: Added Grant Wizard option under Package node. Fixes #
Previous Message Nikhil Mohite 2021-06-03 10:21:50 Re: [pgAdmin][RM-6460]: Need a mechanism to detect a corrupt/broken config DB file.