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