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: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>, 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-05-21 07:03:34
Message-ID: CANxoLDf82r-kZfctPF5kG1dePwgCEveL=XGo7anmZi9Vvjdb=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Hackers

On Thu, May 13, 2021 at 7:03 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

>
>
> On Thu, May 13, 2021 at 11:03 AM Akshay Joshi <
> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
>>
>>
>> On Thu, May 13, 2021 at 3:09 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> Hi Akshay,
>>>
>>> On Thu, May 13, 2021 at 10:35 AM Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Aditya/Hackers
>>>>
>>>> [image: Screenshot 2021-05-13 at 3.02.59 PM.png]
>>>>
>>>> Are the above changes looks good?
>>>>
>>>
>>> Well, s/Global/Default, but otherwise that, and the other UI is fine.
>>>
>>> However, that does mean the path needs to be set for every server (and
>>> keep in mind, I know some users of this code have hundreds registered), and
>>> it also means that we cannot pre-configure the paths in, for example, our
>>> container.
>>>
>>
>> Yes, if the user wants to set it, else default path in the
>> preferences is applicable. Yes, we can't pre-configure the paths.
>>
>>>
>>> I'd prefer to see all the configuration in Preferences, so we'd maybe
>>> have a grid instead of a text field, containing three columns, one with the
>>> major version number, and one with the path to use for that version. The
>>> third column would be a radio button to mark a particular path as the
>>> default to use in case another path isn't set.
>>>
>>
>> OK, we need to create a new control for that which we can add into the
>> Preferences. If I understand correctly initially the grid is empty, the
>> user will have to add the major version (from the drop-down and that list
>> contains values like 'PostgreSQL 10', 'PostgreSQL 11', 'EDB Advanced Server
>> 10', .....) and respective path.
>>
>
> No, I would say it should be pre-filled with the supported versions.
>
> It doesn't necessarily have to be a grid though, if you can think of a
> better way of presenting it.
>
> Also; we will also need some to migrate and extend this config:
>
> DEFAULT_BINARY_PATHS = {
> "pg": "",
> "ppas": "",
> "gpdb": ""}
>
>
>
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, ...)

>
>
>
>>
>>>
>>>>
>>>>
>>>> On Thu, May 13, 2021 at 2:43 PM Aditya Toshniwal <
>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi Akshay,
>>>>>
>>>>> Just to make it more discoverable, please also change the help text in
>>>>> Preferences dialog.
>>>>>
>>>>> On Thu, May 13, 2021 at 2:26 PM Akshay Joshi <
>>>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>>> Hi Dave/Hackers
>>>>>>
>>>>>> I have implemented feature #5370 "User should be able to set the
>>>>>> binary path for each database server." I have added "Utility path" control
>>>>>> in the Advanced tab of the server dialog, refer to the image below:
>>>>>>
>>>>>> [image: Screenshot 2021-05-13 at 2.11.52
>>>>>> PM.png]
>>>>>>
>>>>>> If the above path is set by the user then will pick that else we will
>>>>>> pick the default binary path of the preferences dialog (if set). In case
>>>>>> utility is not found on the specified path we raise the popup dialog with
>>>>>> the modified error message.
>>>>>>
>>>>>> [image: Screenshot 2021-05-13 at 2.12.28
>>>>>> PM.png]
>>>>>>
>>>>>> If the above implementation looks good then, I'll commit this feature
>>>>>> by today's EOD.
>>>>>>
>>>>>> --
>>>>>> *Thanks & Regards*
>>>>>> *Akshay Joshi*
>>>>>> *pgAdmin Hacker | Principal Software Architect*
>>>>>> *EDB Postgres <http://edbpostgres.com>*
>>>>>>
>>>>>> *Mobile: +91 976-788-8246*
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks,
>>>>> Aditya Toshniwal
>>>>> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
>>>>> <http://edbpostgres.com>
>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>
>>>>
>>>>
>>>> --
>>>> *Thanks & Regards*
>>>> *Akshay Joshi*
>>>> *pgAdmin Hacker | Principal Software Architect*
>>>> *EDB Postgres <http://edbpostgres.com>*
>>>>
>>>> *Mobile: +91 976-788-8246*
>>>>
>>>
>>>
>>> --
>>> 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*
>>
>
>
> --
> 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 Dave Page 2021-05-21 07:31:04 Re: Feature #5370 User should be able to set the binary path for each database server
Previous Message Akshay Joshi 2021-05-20 13:19:50 pgAdmin 4 commit: Tag REL-5_3 has been created.