public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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, 4 Jun 2021 17:33:25 +0530
Message-ID: <CAJ9T6St0ZW5C6XArAUspyjmu7kqiQHjF6prqXa+KxLY-YyDDtw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcVDsWGdbRpvSKTtJpwP8jWLkdUBzjHa5a+dOrRWJK8Ug@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>

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


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_v3.patch (2.0K, 5-RM6231_v3.patch)
  download | inline diff:
diff --git a/requirements.txt b/requirements.txt
index e3133e368..284803485 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -39,4 +39,3 @@ gssapi==1.6.*
 flask-socketio>=5.0.1
 eventlet==0.30.2
 httpagentparser==1.9.*
-user_agents==2.2.*
diff --git a/web/pgadmin/about/__init__.py b/web/pgadmin/about/__init__.py
index a27248559..6fbac436a 100644
--- a/web/pgadmin/about/__init__.py
+++ b/web/pgadmin/about/__init__.py
@@ -20,6 +20,7 @@ import config
 import httpagentparser
 from pgadmin.model import User
 from user_agents import parse
+import platform
 
 MODULE_NAME = 'about'
 
@@ -110,17 +111,15 @@ def detect_browser(request):
     """This function returns the browser and os details"""
     nwjs_version = None
     agent = request.environ.get('HTTP_USER_AGENT')
-    user_agent = parse(agent)
+    os_details = parse(platform.platform()).ua_string
 
     if 'Nwjs' in agent:
         agent = agent.split('-')
         nwjs_version = agent[0].split(':')[1]
         browser = 'Chromium' + ' ' + agent[2]
-        os_details = user_agent.os.family + ' ' + user_agent.os.version_string
 
     else:
         browser = httpagentparser.detect(agent)
-        os_details = user_agent.os.family + ' ' + user_agent.os.version_string
         if not browser:
             browser = agent.split('/')[0]
         else:
diff --git a/web/pgadmin/about/templates/about/index.html b/web/pgadmin/about/templates/about/index.html
index e1c94f0bf..a3c6d0c2d 100644
--- a/web/pgadmin/about/templates/about/index.html
+++ b/web/pgadmin/about/templates/about/index.html
@@ -38,7 +38,7 @@
         <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: 120%; white-space: pre-wrap;" readonly>{{ info.settings|safe }}</textarea></div>
+        <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>
     {% 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: <CAJ9T6St0ZW5C6XArAUspyjmu7kqiQHjF6prqXa+KxLY-YyDDtw@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