public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM6231]- Add OS, Browser details in pgAdmin About us pop-up
Date: Fri, 11 Jun 2021 19:19:57 +0530
Message-ID: <CAJ9T6Sv-uJFyegsCNqM4Mc8w7HU_KG98bJU9_LfA7AmW8SuiOQ@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoxsmc2rAWTbKWXpA1OHoXOpCTXYYyT8DjpO31oaLG095g@mail.gmail.com>
References: <CAJ9T6Svgp3gKnyRNjS-XkX69e-kNXUDU1BesV1s=ESgNxp2GAA@mail.gmail.com>
<CANxoLDdvJewB488GhL-ByzGuVERto=3Bw=w9ObyR8meK3qDQYA@mail.gmail.com>
<CAJ9T6Sv57RtY29R6ybac947O5N50UtK1ezXCk8Pa53O0SZVi=g@mail.gmail.com>
<CANxoLDcVDsWGdbRpvSKTtJpwP8jWLkdUBzjHa5a+dOrRWJK8Ug@mail.gmail.com>
<CAJ9T6St0ZW5C6XArAUspyjmu7kqiQHjF6prqXa+KxLY-YyDDtw@mail.gmail.com>
<CAKKotZQ+biFmJWXSmTHFij_a+tA729e_=htPfH1xeN1jFfnGhg@mail.gmail.com>
<CA+OCxoyU30j36Y2eUHhz4w3_0aUu-mU1pCjE3wsAPwpc3JCiog@mail.gmail.com>
<CAKKotZR8f7D-yEt5entm56xhc-WTCFrCqmrUTcqoVSYJ1yscPw@mail.gmail.com>
<CA+OCxoxsmc2rAWTbKWXpA1OHoXOpCTXYYyT8DjpO31oaLG095g@mail.gmail.com>
Hi Akshay,
Please find the attached patch for #6231.I have fixed all review comments
given in the team.
On Fri, Jun 4, 2021 at 8:09 PM Dave Page <[email protected]> wrote:
>
>
> On Fri, Jun 4, 2021 at 3:14 PM Murtuza Zabuawala <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>> On Fri, Jun 4, 2021 at 7:23 PM Dave Page <[email protected]>
>> wrote:
>>
>>> Hi
>>>
>>> On Fri, Jun 4, 2021 at 2:34 PM Murtuza Zabuawala <
>>> [email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> I want to propose a suggestion here, If we can display configuration
>>>> data in category/tab like below then it will make sense for the user
>>>> (instead of dumping everthing in one single textbox randomly from
>>>> config file)
>>>>
>>>> SMTP
>>>> - config1=value1
>>>> - config2=value2
>>>> - config3=value3 ...
>>>> AUTHENTICATION
>>>> - KERBERSOE
>>>> - config1=value1
>>>> - config2=value2
>>>> - config3=value3 ...
>>>> - LDAP
>>>> - config1=value1
>>>> - config2=value2
>>>> - config3=value3 ...
>>>> SECURITY
>>>> - config1=value1
>>>> - config2=value2
>>>> - config3=value3 ...
>>>>
>>>
>>> It would, but it's not really worth the effort. This is really intended
>>> as debugging info the user can just copy/paste into an email to us.
>>>
>>
>> If it is for debugging purpose only then can we just place a "Copy
>> configuration" button and hide this textbox, by clicking on the button will
>> copy all the pgadmin4 configuration on the user's clipboard and can avoid
>> clutter from the about window.
>>
>
> It's still useful to read it occasionally IMHO.
>
>
>>
>>
>>>
>>>>
>>>>
>>>> Regards,
>>>> Murtuza
>>>>
>>>> On Fri, Jun 4, 2021 at 5:33 PM Pradip Parkale <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Akshay,
>>>>>
>>>>> Please find the updated patch. I have fixed the OS details issue for
>>>>> Linux, MacOS big sur.
>>>>>
>>>>> On Tue, Jun 1, 2021 at 8:48 PM Akshay Joshi <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Thanks, patch applied.
>>>>>>
>>>>>> On Tue, Jun 1, 2021 at 2:03 PM Pradip Parkale <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Akshay,
>>>>>>>
>>>>>>> Please find an updated patch.
>>>>>>>
>>>>>>>
>>>>>>> On Mon, May 24, 2021 at 4:45 PM Akshay Joshi <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Pradip
>>>>>>>>
>>>>>>>> Following are the review comments:
>>>>>>>>
>>>>>>>> - Following labels should be changed
>>>>>>>> - Browser Details -> Browser
>>>>>>>> - OS -> Operating System
>>>>>>>> - Config DB -> pgAdmin Database File
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>>
>>>>>>>> - Server Configuration Text Area should be *readonly* and it
>>>>>>>> should have a "col-sm-9" class instead of "col-sm-3".
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>>
>>>>>>>> - If the user resizes the About dialog then instead of showing
>>>>>>>> blank space can we automatically resize the Server configuration text area?
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>>
>>>>>>>> - The height of the About dialog in the Server mode should be
>>>>>>>> less as we are not showing "Server Configuration".
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>>
>>>>>>>> - In Runtime, we should merge the 'Browser details' in 'NW.js
>>>>>>>> version' like *0.51.2 (Chromium 89.0.4389.114)* OR at least
>>>>>>>> prefix 'Chromium' before the version in the 'Browser details'.
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>>
>>>>>>>> - Found string difference in OS details for Runtime and Desktop
>>>>>>>> mode.
>>>>>>>> - OSX: "Intel Mac OS X 10_15_7" in Runtime, while "Mac OS X
>>>>>>>> 10.15.7" in Dekstop mode.
>>>>>>>> - Windows: "Win64" in Runtime, while "Windows 10" in Desktop
>>>>>>>> which also not correct, I am using "Windows Server 2016".
>>>>>>>> - Following issue found on Firefox (First Image) configuration
>>>>>>>> in a single line, Safari (Second image) too many scroll bars.
>>>>>>>>
>>>>>>>> Done.
>>>>>>>
>>>>>>>> [image: Firefox.png]. [image: Safari.png]
>>>>>>>>
>>>>>>>> On Fri, May 21, 2021 at 2:23 PM Pradip Parkale <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Hackers,
>>>>>>>>>
>>>>>>>>> Please find the attached patch for #6231. I have added OS, NW.js,
>>>>>>>>> browser details, and some server configuration in the About pgAdmin pop-up.
>>>>>>>>>
>>>>>>>>> Server configuration won't be visible to the non-admin users in
>>>>>>>>> server mode.
>>>>>>>>> --
>>>>>>>>> Thanks & Regards,
>>>>>>>>> Pradip Parkale
>>>>>>>>> Software Engineer | EnterpriseDB Corporation
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Thanks & Regards*
>>>>>>>> *Akshay Joshi*
>>>>>>>> *pgAdmin Hacker | Principal Software Architect*
>>>>>>>> *EDB Postgres <http://edbpostgres.com>*
>>>>>>>>
>>>>>>>> *Mobile: +91 976-788-8246*
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>> Pradip Parkale
>>>>>>> Software Engineer | EnterpriseDB Corporation
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Thanks & Regards*
>>>>>> *Akshay Joshi*
>>>>>> *pgAdmin Hacker | Principal Software Architect*
>>>>>> *EDB Postgres <http://edbpostgres.com>*
>>>>>>
>>>>>> *Mobile: +91 976-788-8246*
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Pradip Parkale
>>>>> Software Engineer | EnterpriseDB Corporation
>>>>>
>>>>
>>>
>>> --
>>> Dave Page
>>> VP, Chief Architect, Database Infrastructure
>>> Blog: https://www.enterprisedb.com/dave-page
>>> Twitter: @pgsnake
>>>
>>> EDB: https://www.enterprisedb.com
>>>
>>
>
> --
> Dave Page
> VP, Chief Architect, Database Infrastructure
> Blog: https://www.enterprisedb.com/dave-page
> Twitter: @pgsnake
>
> EDB: https://www.enterprisedb.com
>
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[image/png] Firefox.png (122.7K, 3-Firefox.png)
download | view image
[image/png] Safari.png (154.4K, 4-Safari.png)
download | view image
[application/octet-stream] RM6231_v4.patch (3.7K, 5-RM6231_v4.patch)
download | inline diff:
diff --git a/web/pgadmin/about/__init__.py b/web/pgadmin/about/__init__.py
index 6fbac436a..0076a8a93 100644
--- a/web/pgadmin/about/__init__.py
+++ b/web/pgadmin/about/__init__.py
@@ -84,16 +84,25 @@ def index():
info['current_user'] = current_user.email
- settings = ''
+ settings = ""
for setting in dir(config):
if not setting.startswith('_') and setting.isupper() and \
setting not in ['CSRF_SESSION_KEY',
'SECRET_KEY',
'SECURITY_PASSWORD_SALT',
'SECURITY_PASSWORD_HASH',
- 'ALLOWED_HOSTS']:
- settings = settings + '{} = {}\n'.format(setting,
- getattr(config, setting))
+ 'ALLOWED_HOSTS'
+ 'MAIL_PASSWORD',
+ 'LDAP_BIND_PASSWORD',
+ 'SECURITY_PASSWORD_HASH']:
+ if isinstance(getattr(config, setting), str):
+ settings = \
+ settings + '{} = "{}"\n'.format(
+ setting, gettext(getattr(config, setting)))
+ else:
+ settings = \
+ settings + '{} = {}\n'.format(
+ setting, gettext(getattr(config, setting)))
info['settings'] = settings
diff --git a/web/pgadmin/about/static/js/about.js b/web/pgadmin/about/static/js/about.js
index 4dfa6b149..63a09c8a0 100644
--- a/web/pgadmin/about/static/js/about.js
+++ b/web/pgadmin/about/static/js/about.js
@@ -45,11 +45,26 @@ define(
},
hooks:{
onshow:function(){
+ var self = this;
var container = $(this.elements.footer).find('button:not([disabled])');
commonUtils.findAndSetFocus(container);
+ $('#copy_textarea').on('click', function(){
+ //Copy the server configuration details
+ let textarea = document.getElementById('about-textarea');
+ textarea.select();
+ document.execCommand('copy');
+ $('#copy_textarea').text('Copied');
+ });
+
+ $(this.elements.resizeHandle).on('click', function(){
+ // Set the height of the Textarea
+ var height = self.elements.dialog.scrollHeight - 300;
+ if (height < 0)
+ height = self.elements.dialog.scrollHeight - 150;
+ $('#about-textarea').css({'height':height});
+ });
},
},
-
prepare:function() {
this.setContent(this.message);
},
diff --git a/web/pgadmin/about/templates/about/index.html b/web/pgadmin/about/templates/about/index.html
index a3c6d0c2d..e7810a6b7 100644
--- a/web/pgadmin/about/templates/about/index.html
+++ b/web/pgadmin/about/templates/about/index.html
@@ -38,7 +38,10 @@
<div class="col-sm-3"><b>{{ _('Server Configuration') }}</b></div>
</div>
<div class="row">
- <div class="col-sm-9"><textarea rows="7" cols="85" style="width:120%; height: auto; white-space: pre-wrap;" readonly>{{ info.settings|safe }}</textarea></div>
+ <div class="col-sm-9">
+ <textarea id="about-textarea" rows="7" cols="150" style="position: relative;width:101%; white-space: pre-wrap;" readonly>{{ info.settings|safe }}</textarea>
+ <button class="btn btn-secondary about-copy" id="copy_textarea" style="position:absolute;top:0;right:0;z-index:20;padding:0px;">Copy</button>
+ </div>
</div>
{% endif %}
</div>
view thread (13+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin][RM6231]- Add OS, Browser details in pgAdmin About us pop-up
In-Reply-To: <CAJ9T6Sv-uJFyegsCNqM4Mc8w7HU_KG98bJU9_LfA7AmW8SuiOQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox