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

Commit 8f5e8278 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update main to instantiate only the part of the model required by a controller.

parent 9fef7986
......@@ -81,78 +81,87 @@ T.lazy = True # immediate translation
# Configure plugin_dbui
#
Dbui.define_paths(
app_css="static/my.css",
app_lg="static/limbra/locale/limbra-lang-fr.js",
app_libmin="static/limbra-min.js",
app_script="static/app.js")
ctrl = request.controller
fnct = request.function
if ctrl == "plugin_dbui" and fnct in ("about", "index"):
Dbui.define_paths(
app_css="static/my.css",
app_lg="static/limbra/locale/limbra-lang-fr.js",
app_libmin="static/limbra-min.js",
app_script="static/app.js")
# ............................................................................
#
# Create the database models
#
App.define_tables(db, T)
Core.define_tables(db, T)
Harvester.define_tables(db, T)
Report.define_tables(db, T)
Selector.define_tables(virtdb, db, T)
if ctrl != "plugin_dbui" or fnct in ("call", "csv", "dbui_conf"):
App.define_tables(db, T)
Core.define_tables(db, T)
Harvester.define_tables(db, T)
Report.define_tables(db, T)
Selector.define_tables(virtdb, db, T)
# ............................................................................
#
# Configure the user interface
#
Dbui.initialise_ui()
directSvc = Dbui.start_directSvc()
# common configuration for forms and grids
tables = ["application",
"auth_group",
"auth_membership",
"auth_user",
"authors_roles",
"axes",
"categories",
"collaborations",
"controllers",
"countries",
"harvesters",
"graphs",
"lists",
"metrics",
"my_authors",
"organisation",
"projects",
"publications",
"publishers",
"renderers",
"reports",
"sections",
"status",
"teams"]
# a user see the categories table but he/she can not modify it.
if session.role == USER:
tables.remove("categories")
configure_forms(
tables,
plugins=["pFormToolTip"],
width=350)
configure_grids(
tables,
plugins=[
"pGridRowEditorConfirmDelete",
"pGridRowEditorContextMenu",
"pGridRowEditorDblClick",
"pGridToolbar"])
AppUI.configure(db, T)
AuthUI.configure(db, T)
CoreUI.configure(db, T)
HarvesterUI.configure(db, T)
ReportUI.configure(db, T)
SelectorUI.configure(virtdb, db, T)
ViewportUi.configure(db, T, virtdb)
if ctrl == "plugin_dbui" and fnct in ("call", "dbui_conf"):
Dbui.initialise_ui()
directSvc = Dbui.start_directSvc()
# common configuration for forms and grids
tables = ["application",
"auth_group",
"auth_membership",
"auth_user",
"authors_roles",
"axes",
"categories",
"collaborations",
"controllers",
"countries",
"harvesters",
"graphs",
"lists",
"metrics",
"my_authors",
"organisation",
"projects",
"publications",
"publishers",
"renderers",
"reports",
"sections",
"status",
"teams"]
# a user see the categories table but he/she can not modify it.
if session.role == USER:
tables.remove("categories")
configure_forms(
tables,
plugins=["pFormToolTip"],
width=350)
configure_grids(
tables,
plugins=[
"pGridRowEditorConfirmDelete",
"pGridRowEditorContextMenu",
"pGridRowEditorDblClick",
"pGridToolbar"])
AppUI.configure(db, T)
AuthUI.configure(db, T)
CoreUI.configure(db, T)
HarvesterUI.configure(db, T)
ReportUI.configure(db, T)
SelectorUI.configure(virtdb, db, T)
# configure the viewport
if fnct == "dbui_conf":
ViewportUi.configure(db, T, virtdb)
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