Hi,

Please find the attached patch to fix the RM 1785:  PPAS Servers are
consider to be PostgreSQL until after the first disconnect/reconnect

Issue:
After creating a new server, the icon and the server type were not set
properly in the response, so fixed both in the response.

Thanks,
Khushboo
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py
index a6fe620..a128f2b 100644
--- a/web/pgadmin/browser/server_groups/servers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/__init__.py
@@ -623,18 +623,17 @@ class ServerNode(PGChildNodeView):
 
                     user = manager.user_info
                     connected = True
-                    icon = "icon-pg"
 
             return jsonify(
                 node=self.blueprint.generate_browser_node(
                     "%d" % server.id, server.servergroup_id,
                     server.name,
-                    icon,
+                    'icon-{0}'.format(manager.server_type) if manager.server_type else "icon-pg",
                     True,
                     self.node_type,
                     user=user,
                     connected=connected,
-                    server_type='pg'  # Default server type
+                    server_type=manager.server_type if manager.server_type else 'pg'
                 )
             )
 
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to