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

Method register_node_view

web/pgadmin/browser/utils.py:312–340  ·  view source on GitHub ↗
(cls, blueprint)

Source from the content-addressed store, hash-verified

310
311 @classmethod
312 def register_node_view(cls, blueprint):
313 cls.blueprint = blueprint
314 id_url, url = cls.get_node_urls()
315
316 commands = cls.generate_ops()
317
318 for c in commands:
319 cmd = c['cmd'].replace('.', '-')
320 if c['with_id']:
321 blueprint.add_url_rule(
322 '/{0}{1}'.format(
323 c['cmd'], id_url if c['req'] else url
324 ),
325 view_func=cls.as_view(
326 '{0}{1}'.format(
327 cmd, '_id' if c['req'] else ''
328 ),
329 cmd=c['cmd']
330 ),
331 methods=c['methods']
332 )
333 else:
334 blueprint.add_url_rule(
335 '/{0}'.format(c['cmd']),
336 view_func=cls.as_view(
337 cmd, cmd=c['cmd']
338 ),
339 methods=c['methods']
340 )
341
342 def children(self, *args, **kwargs):
343 """Build a list of treeview nodes from the child nodes."""

Callers 15

__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80
__init__.pyFile · 0.80

Calls 2

get_node_urlsMethod · 0.80
generate_opsMethod · 0.80

Tested by

no test coverage detected