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:
Dave Page
2015-02-15 17:10:53 -05:00
parent e2832351ed
commit 89cc11fb80
20 changed files with 415 additions and 48 deletions
+8 -3
View File
@@ -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