Subject: [pgAdmin4][Patch]: RM 1785 - PPAS Servers are consider to be PostgreSQL until after the first disconnect/reconnect

From: Khushboo Vashi <[email-masked]>
Date: Fri, 7 Oct 2016 16:58:11 +0530

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 ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Fri, 7 Oct 2016 12:57:47 +0100

Thanks, patch applied.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company