mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Fixed OS detail issue for Linux and MacOS Big Sur. Fixes #6231.
This commit is contained in:
parent
4bc4ca1ba9
commit
a0deab901d
@ -39,4 +39,3 @@ gssapi==1.6.*
|
||||
flask-socketio>=5.0.1
|
||||
eventlet==0.30.2
|
||||
httpagentparser==1.9.*
|
||||
user_agents==2.2.*
|
||||
|
@ -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:
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user