Commit a0243fc9 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the modules to add a mechanism to register sources.

parent a96559a8
......@@ -2,6 +2,7 @@
from import Storage
from import PluginManager
......@@ -32,3 +33,21 @@ class Event(object):
"debug": None,
"lg": "static/plugin_event/locale/event-lang-%s.js" % lg,
"libmin": "static/plugin_event/event-min.js"}
def register_source(func, kwargs):
"""Register sources which are used in the reporting section.
name (str): name of the source to be used in the UI.
func (reference): the function generating the DataFrame.
kwargs (dict): input keyword arguments
event = PluginManager("event").event
if event.source is None:
event.source = Storage()
event.source[name] = Storage(func=func, kwargs=kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment