mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Do not need to implement the BackendSupported function in resource
group, we do have the same function in CollectionModule class, which will work, when we set the min_ver, max_ver and server_type properly. Thanks Khushboo for pointing that out, and Akshay for quick testing for this patch.
This commit is contained in:
parent
db9b5f0e0c
commit
6c2faa984b
@ -60,31 +60,11 @@ class ResourceGroupModule(CollectionNodeModule):
|
||||
*args:
|
||||
**kwargs:
|
||||
"""
|
||||
self.min_ver = None
|
||||
self.max_ver = None
|
||||
|
||||
super(ResourceGroupModule, self).__init__(*args, **kwargs)
|
||||
|
||||
def BackendSupported(self, manager, **kwargs):
|
||||
"""
|
||||
This function is used to check the database server type and version.
|
||||
Resource Group only supported in PPAS 9.4 and above.
|
||||
|
||||
Args:
|
||||
manager: Object of the server manager class.
|
||||
**kwargs:
|
||||
|
||||
Returns: True or False
|
||||
"""
|
||||
if super(ResourceGroupModule, self).BackendSupported(manager, **kwargs):
|
||||
conn = manager.connection()
|
||||
# If DB is not connected then return error to browser
|
||||
if not conn.connected():
|
||||
return precondition_required(gettext("Connection to the server has been lost!"))
|
||||
if manager.server_type == 'ppas' and manager.version >= 90400:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
self.min_ver = 90400
|
||||
self.max_ver = None
|
||||
self.server_type = ['ppas']
|
||||
|
||||
def get_nodes(self, gid, sid):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user