Fixed OS detail issue for Linux and MacOS Big Sur. Fixes #6231.

This commit is contained in:
Pradip Parkale 2021-06-04 17:57:58 +05:30 committed by Akshay Joshi
parent 4bc4ca1ba9
commit a0deab901d
3 changed files with 3 additions and 5 deletions

View File

@ -39,4 +39,3 @@ gssapi==1.6.*
flask-socketio>=5.0.1
eventlet==0.30.2
httpagentparser==1.9.*
user_agents==2.2.*

View File

@ -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:

View File

@ -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>