Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 4911ff0e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add the class Event to initialise plugin_event.

parent de8c90ab
......@@ -12,15 +12,8 @@ Note:
"""
import plugin_dbui as dbui
import plugin_event as event
from datetime import datetime
from plugin_event import (EvtModelCore,
EvtModelReport,
EvtModelSelector,
EvtUiCore,
EvtUiReport,
EvtUiSelector,
EvtUiViewport)
ctrl = request.controller
fnct = request.function
......@@ -49,6 +42,8 @@ if is_dbui:
app_libmin="static/track_events-min.js",
app_script="static/app.js")
event.Event.initialise_paths()
#.............................................................................
#
# Create the database models
......@@ -58,9 +53,9 @@ is_db = (ctrl == "plugin_dbui" and fnct in ("call", "csv", "dbui_conf")) or \
(ctrl == "plugin_event")
if is_db:
EvtModelCore(db, T)
EvtModelReport(db, T)
EvtModelSelector(virtdb, db, T)
event.EvtModelCore(db, T)
event.EvtModelReport(db, T)
event.EvtModelSelector(virtdb, db, T)
#.............................................................................
#
......@@ -99,11 +94,11 @@ if ctrl == "plugin_dbui" and fnct in ("call", "dbui_conf"):
"pGridToolbar"])
# tune the user interface
EvtUiCore(db, T)
EvtUiReport(db, T)
event.EvtUiCore(db, T)
event.EvtUiReport(db, T)
selector_panel = EvtUiSelector.selector(virtdb, db, T)
selector_panel = event.EvtUiSelector.selector(virtdb, db, T)
# configure the main viewport
if fnct == "dbui_conf":
EvtUiViewport(db, T, selector_panel)
event.EvtUiViewport(db, T, selector_panel)
......@@ -2,6 +2,8 @@
from callbacks import INHIBIT_CASCADE_DELETE
from event import Event
from matplotlib_tools import (create_pdf,
header_footer,
plot_references,
......
# -*- coding: utf-8 -*-
""" event.py
"""
from gluon.tools import PluginManager
class Event(object):
"""Initialise the plugin Event.
"""
def __init__(self):
Event.initialise_paths()
@staticmethod
def initialise_paths():
"""Add paths for the plugin_event.
Note:
The corresponding files will be loaded
via the controller ``plugin_dbui/index``
"""
dbui = PluginManager("dbui").dbui
dbui.plugins_paths["event"] = {
"css": "static/plugin_event/resources/css/event.css",
"debug": "static/plugin_event/event-debug.js",
"lg": "static/plugin_event/locale/event-lang-fr.js",
"libmin": "static/plugin_event/event-min.js"}
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