mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-08 20:18:28 -05:00
This is a big one campers; Add initial support for treeview nodes.
This commit adds the following: - Storage of server groups in the configuration database - Creation of a default server group on in the database - A mechanism for plugging in treeview node types - A node type for server groups with: - Treeview display - Custom per-node javascript implementing a menu option/dialogue to add new groups - Custom per-node CSS to style the treeview node - JSON formatted data in response to AJAX requests, including: - Success/failure indication - Error message - Extra info (e.g. stack trace) - The original request data - Additional return data, e.g. node ID and label etc.
This commit is contained in:
@@ -103,10 +103,10 @@ def create_app(app_name=config.APP_NAME):
|
||||
|
||||
# Looks like a module, so import it, and register the blueprint if present
|
||||
# We rely on the ordering of syspath to ensure we actually get the right
|
||||
# module here. Note that we also try to load the 'browser' module for
|
||||
# the browser integration hooks.
|
||||
# module here. Note that we also try to load the 'hooks' module for
|
||||
# the browser integration hooks and other similar functions.
|
||||
app.logger.info('Examining potential module: %s' % d)
|
||||
module = __import__(f, globals(), locals(), ['browser', 'views'], -1)
|
||||
module = __import__(f, globals(), locals(), ['hooks', 'views'], -1)
|
||||
|
||||
# Add the module to the global module list
|
||||
modules.append(module)
|
||||
@@ -118,6 +118,11 @@ def create_app(app_name=config.APP_NAME):
|
||||
app.logger.debug(' - root_path: %s' % module.views.blueprint.root_path)
|
||||
app.logger.debug(' - static_folder: %s' % module.views.blueprint.static_folder)
|
||||
app.logger.debug(' - template_folder: %s' % module.views.blueprint.template_folder)
|
||||
|
||||
# Register any sub-modules
|
||||
if 'hooks' in dir(module) and 'register_submodules' in dir(module.hooks):
|
||||
app.logger.info('Registering sub-modules in %s' % f)
|
||||
module.hooks.register_submodules(app)
|
||||
|
||||
##########################################################################
|
||||
# Handle the desktop login
|
||||
|
||||
Reference in New Issue
Block a user