mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
connect to the database server. Also, added modified the way, we do check the node is supported by the server. Instead of creating separate blueprint for the server types, they will be independently works. In order to add different variant of the PostgreSQL, we need to extend the ServerType class, and override the 'instanceOf' function for identification using version string. Please take a look at the ppas.py for the example. During checking the back-end support for the node, we will also check the server type (variant) along with the version within the range of maximum and minimum version for the node. And, the same support added for the schema attributes in front-end (JavaScript). Really thankful to Khushboo Vashi for her initial work in front-end. I took it further from there.
20 lines
590 B
Python
20 lines
590 B
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2015, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
from flask.ext.babel import gettext
|
|
from pgadmin.browser.server_groups.servers.types import ServerType
|
|
|
|
|
|
class PPAS(ServerType):
|
|
|
|
def instanceOf(self, ver):
|
|
return ver.startswith("EnterpriseDB")
|
|
|
|
# Default Server Type
|
|
PPAS('ppas', gettext("Postgres Plus Advanced Server"), 2)
|