Commit 34af3e66 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Modify the db model by adding the field scan in the harvesters table.

parent 444d71f3
docs/db_schema/database.png

104 KB | W: | H:

docs/db_schema/database.png

181 KB | W: | H:

docs/db_schema/database.png
docs/db_schema/database.png
docs/db_schema/database.png
docs/db_schema/database.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
......@@ -49,6 +49,7 @@
'auth_user': 'auth_user',
'Author': 'Auteur',
"author's rescue list": 'liste de secours pour les auteurs du laboratoire',
'Authorize automatic scan.': 'Authorise le mossonage automatique.',
'Authors': 'Auteurs',
'Authors Cppm': 'Auteurs du CPPM',
'authors_roles': 'rôles des auteurs',
......@@ -529,6 +530,7 @@
'run all harvesters': 'exécuter tous les moissonneurs',
'Rôle': 'Rôle',
'Save profile': 'Save profile',
'Scan': 'Scan',
'Scan %s': 'Scan %s',
'Scan between %s and %s': 'Scan between %s and %s',
'Scan from %s to %s': 'Scan de %s à %s',
......
# -*- coding: utf-8 -*-
""" harvesters
The table my_authors, controllers and harvesters are used
The table my_authors, controllers and harvesters are used
by the harvesters tool.
"""
......@@ -14,6 +14,9 @@ T("Address of the invenio store where the search is performed.")
tp_ratio = \
T("Parameter for fuzzy string search.")
tp_scan = \
T("Authorize automatic scan.")
db.define_table("harvesters",
Field("id_teams", "reference teams", label='Team', notnull=True),
Field("id_projects", "reference projects", label='Project', notnull=True),
......@@ -21,6 +24,7 @@ db.define_table("harvesters",
Field("host", "string", length=255, comment=tp_host, default=STORES[0], label='Store', notnull=True),
Field("collections", "string", length=255, comment=tp_collections, notnull=True),
Field("ratio", "double", comment=tp_ratio, default=1.0, notnull=True),
Field("scan", "boolean", comment=tp_scan, default=False),
Field("id_categories", "reference categories", comment=tp_category, label='Category', notnull=True),
migrate="harvesters.table")
......@@ -30,4 +34,4 @@ db.harvesters.host.filter_in = dbui.CLEAN_SPACES
db.harvesters.controller.requires = IS_IN_DB(db, 'controllers.controller')
db.harvesters.host.requires = IS_IN_SET(STORES)
db.harvesters.ratio.requires = IS_FLOAT_IN_RANGE(0., 1.0)
\ No newline at end of file
db.harvesters.ratio.requires = IS_FLOAT_IN_RANGE(0., 1.0)
......@@ -40,6 +40,7 @@ gridModifier.configure_column('id_teams', width=75)
gridModifier.configure_column('collections', width=300)
gridModifier.configure_column('max_records', width=70)
gridModifier.configure_column('ratio', width=40)
gridModifier.configure_column('scan', width=40)
gridModifier.hide_columns('ratio')
gridModifier.append_filter(('id_teams', '==', T('is equal to')))
......@@ -49,7 +50,7 @@ gridModifier.append_filter(('host', 'contains', T('contains')))
gridModifier.append_filter(('id_categories', '==', T('is equal to')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
gridModifier.configure_gridWithFilter(selectorTitle=T('Filter'))
#-------------------------------------------------------------------------------
#
......
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