MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / get_node_urls

Method get_node_urls

web/pgadmin/browser/utils.py:228–242  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

226
227 @classmethod
228 def get_node_urls(cls):
229 assert cls.node_type is not None, \
230 "Please set the node_type for this class ({0})".format(
231 str(cls.__class__.__name__))
232 common_url = '/'
233 for p in cls.parent_ids:
234 common_url += '<{0}:{1}>/'.format(str(p['type']), str(p['id']))
235
236 id_url = None
237 for p in cls.ids:
238 id_url = '{0}<{1}:{2}>'.format(
239 common_url if not id_url else id_url,
240 p['type'], p['id'])
241
242 return id_url, common_url
243
244 def __init__(self, **kwargs):
245 self.cmd = kwargs['cmd']

Callers 1

register_node_viewMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected