Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
tev
plugin_event
Commits
4911ff0e
Commit
4911ff0e
authored
Nov 29, 2016
by
LE GAC Renaud
Browse files
Add the class Event to initialise plugin_event.
parent
de8c90ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
15 deletions
+43
-15
models/common_settings.py
models/common_settings.py
+10
-15
modules/plugin_event/__init__.py
modules/plugin_event/__init__.py
+2
-0
modules/plugin_event/event.py
modules/plugin_event/event.py
+31
-0
No files found.
models/common_settings.py
View file @
4911ff0e
...
...
@@ -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
)
modules/plugin_event/__init__.py
View file @
4911ff0e
...
...
@@ -2,6 +2,8 @@
from
callbacks
import
INHIBIT_CASCADE_DELETE
from
event
import
Event
from
matplotlib_tools
import
(
create_pdf
,
header_footer
,
plot_references
,
...
...
modules/plugin_event/event.py
0 → 100644
View file @
4911ff0e
# -*- 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"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment