[llvm-commits] [zorg] r125930 - in /zorg/trunk/llvmlab/llvmlab: llvmlabtool/lab.cfg.sample llvmlabtool/main.py ui/app.py
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:44:24 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:44:23 2011
New Revision: 125930
URL: http://llvm.org/viewvc/llvm-project?rev=125930&view=rev
Log:
llvmlab: Sketch support for dashboard plugins, to support site specific
customization.
Modified:
zorg/trunk/llvmlab/llvmlab/llvmlabtool/lab.cfg.sample
zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py
zorg/trunk/llvmlab/llvmlab/ui/app.py
Modified: zorg/trunk/llvmlab/llvmlab/llvmlabtool/lab.cfg.sample
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/llvmlabtool/lab.cfg.sample?rev=125930&r1=125929&r2=125930&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/llvmlabtool/lab.cfg.sample (original)
+++ zorg/trunk/llvmlab/llvmlab/llvmlabtool/lab.cfg.sample Fri Feb 18 10:44:23 2011
@@ -23,3 +23,6 @@
# Path to the installation directory (which stores data files, status, logs,
# etc.).
INSTALL_PATH = %(install_path)r
+
+# Name of the plugin module to import (optional).
+PLUGIN_MODULE = %(plugin_module)r
Modified: zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py?rev=125930&r1=125929&r2=125930&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py (original)
+++ zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py Fri Feb 18 10:44:23 2011
@@ -51,6 +51,9 @@
group.add_option("", "--master-url", dest="master_url",
help="URL for the buildbot master [%default]",
default='http://lab.llvm.org:8013')
+ group.add_option("", "--plugin-module", dest="plugin_module",
+ help="name of the dashboard plugin to load [%default]",
+ default=None)
group.add_option("", "--debug-server", dest="debug_server",
help="run server in debug mode [%default]",
@@ -88,6 +91,7 @@
opts.admin_password + secret_key).hexdigest()
cfg_options['secret_key'] = secret_key
cfg_options['install_path'] = install_path
+ cfg_options['plugin_module'] = opts.plugin_module
cfg_data = sample_cfg_data % cfg_options
# Write the initial config file.
Modified: zorg/trunk/llvmlab/llvmlab/ui/app.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/app.py?rev=125930&r1=125929&r2=125930&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/app.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/app.py Fri Feb 18 10:44:23 2011
@@ -23,6 +23,9 @@
# Construct the application.
app = App(__name__)
+ # Register additional filters.
+ llvmlab.ui.filters.register(app)
+
# Load the application configuration.
app.load_config(config, config_path)
@@ -59,9 +62,12 @@
app.config.summary = llvmlab.ci.summary.Summary(
llvmlab.ui.ci.views.g_config, app.config.status)
- # Register additional filters.
- llvmlab.ui.filters.register(app)
-
+ # Load any dashboard plugins.
+ plugins_module = app.config["PLUGIN_MODULE"]
+ if plugins_module:
+ module = __import__(plugins_module, fromlist=['__name__'])
+ module.register(app)
+
return app
@staticmethod
More information about the llvm-commits
mailing list