mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-02 20:30:17 -06:00
Adding the Login/Group Role Node.
Also - includes: * Added 'parent_id' in the 'generate_browser_node' function of the Nodes to allow them to move around the parents objects (specially through update/save functionality). * Handles the issue related to adding the older object back to the collection (DataModel). Author: Ashesh Vashi Reviewed by: Neel Patel, and Akshay Joshi.
This commit is contained in:
1 parent
3ff77e9866
commit
91c0388a47
39 files changed
+2797
-19
No files matched your search
@@ -53,7 +53,7 @@ class CollectionNodeModule(PgAdminModule, PGChildModule):
|
||||
return scripts
|
||||
|
||||
def generate_browser_node(
|
||||
self, node_id, label, icon, **kwargs
|
||||
self, node_id, parent_id, label, icon, **kwargs
|
||||
):
|
||||
obj = {
|
||||
"id": "%s/%s" % (self.node_type, node_id),
|
||||
@@ -62,20 +62,22 @@ class CollectionNodeModule(PgAdminModule, PGChildModule):
|
||||
"inode": self.node_inode,
|
||||
"_type": self.node_type,
|
||||
"_id": node_id,
|
||||
"_pid": parent_id,
|
||||
"module": 'pgadmin.node.%s' % self.node_type
|
||||
}
|
||||
for key in kwargs:
|
||||
obj.setdefault(key, kwargs[key])
|
||||
return obj
|
||||
|
||||
def generate_browser_collection_node(self, sid, **kwargs):
|
||||
def generate_browser_collection_node(self, parent_id, **kwargs):
|
||||
obj = {
|
||||
"id": "coll-%s/%d" % (self.node_type, sid),
|
||||
"id": "coll-%s/%d" % (self.node_type, parent_id),
|
||||
"label": self.collection_label,
|
||||
"icon": self.collection_icon,
|
||||
"inode": True,
|
||||
"_type": 'coll-%s' % (self.node_type),
|
||||
"_id": sid,
|
||||
"_id": parent_id,
|
||||
"_pid": parent_id,
|
||||
"module": 'pgadmin.node.%s' % self.node_type
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user