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

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

Add the modules/ui_xx.py.

parent ce27f9c0
# -*- coding: utf-8 -*-
""" affiliation_rules
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('affiliation_keys')
gridModifier.append_filter(('key_u', 'contains', T('contains')))
gridModifier.append_filter(('key_v', 'contains', T('contains')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle=T('Filter'))
gridModifier.configure(plugins=['pGridRowEditorConfirmDelete',
'pGridAffiliationKeysContextMenu'])
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('affiliation_keys')
storeModifier.orderby(db.affiliation_keys.key_u, db.affiliation_keys.key_v)
# -*- coding: utf-8 -*-
""" auth_group
Component of the authentication tool.
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('auth_group')
gridModifier.configure_column('role', width=15)
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
""" auth_membership
Component of the authentication tool.
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('auth_membership')
gridModifier.configure_column('user_id', width=20)
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
""" auth_user
Component of the authentication tool.
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('auth_user')
gridModifier.configure_column('first_name', width=30)
gridModifier.configure_column('last_name', width=30)
gridModifier.hide_columns('password')
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
""" authors_roles
It defined the role of the CPPM authors.
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('authors_role')
gridModifier.configure_column('role', width=75)
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('authors_roles')
storeModifier.orderby(db.authors_roles.role)
# -*- coding: utf-8 -*-
""" axes
The table axes, lists, sections and renderers are used by the lists tool.
It defines the relation between axis and granularity
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('axes')
storeModifier.orderby(db.axes.tr_axis, db.axes.tr_granularity)
# -*- coding: utf-8 -*-
""" categories
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('categories')
gridModifier.configure_column('code', width=10)
gridModifier.configure_column('usual', width=20)
gridModifier.append_filter(('code', 'contains', T('contains')))
gridModifier.append_filter(('usual', 'contains', T('contains')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('categories')
storeModifier.orderby(db.categories.code)
# -*- coding: utf-8 -*-
""" collaborations
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('collaborations')
fieldsModifier.configure_field('collaboration', xtype='textarea')
fieldsModifier.configure_field('synonyms', minimumRows=5)
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('collaborations')
gridModifier.append_filter(('collaboration', 'contains', T('contains')), xtype='textfield')
gridModifier.append_filter(('synonyms', 'contains', T('contains')), xtype='textfield')
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('collaborations')
storeModifier.orderby(db.collaborations.collaboration)
# -*- coding: utf-8 -*-
""" controllers
It define the relation between harvester controllers and
publication categories.
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('controllers')
gridModifier.configure_column('controller', width=15)
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('controllers')
storeModifier.orderby(db.controllers.controller, db.categories.code)
# -*- coding: utf-8 -*-
""" countries
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('countries')
fieldsModifier.configure_field('synonyms', minimumRows=5)
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('countries')
gridModifier.configure_column('country', width=50)
gridModifier.append_filter(('country', 'contains', T('contains')))
gridModifier.append_filter(('synonyms', 'contains', T('contains')), xtype='textfield')
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('countries')
storeModifier.orderby(db.countries.country)
# -*- coding: utf-8 -*-
""" graphs
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('graphs')
fieldsModifier.configure_field('definition', height=100)
fieldsModifier.configure_field('stack_axis', flex=1)
fieldsModifier.configure_field('stack_granularity', flex=1)
fieldsModifier.merge_fields('stack_axis', 'stack_granularity', fieldLabel=T('Stack'))
fieldsModifier.configure_field('stack_axis',
itemId='stack_axis',
displayField='AxesTr_axis',
valueField='AxesAxis',
refStore=dbui.get_store_id('axes'),
emptyText=T('Select axis...'),
userReset=True,
xtype='xcomboboxmaster')
fieldsModifier.configure_field('stack_granularity',
masterItemId='stack_axis',
masterValueField='AxesAxis',
displayField='AxesTr_granularity',
valueField='AxesGranularity',
refStore=dbui.get_store_id('axes'),
emptyText=T('Select granularity...'),
xtype='xcomboboxslave')
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('graphs')
gridModifier.configure_column('graph', width=90)
gridModifier.configure_column('definition', width=250)
gridModifier.hide_columns('stack_axis',
'stack_granularity')
gridModifier.append_filter(('graph', 'contains', T('contains')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('graphs')
storeModifier.orderby(db.graphs.graph)
# -*- coding: utf-8 -*-
""" harvesters
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('harvesters')
fieldsModifier.configure_field('collections', xtype='textarea')
fieldsModifier.configure_field('ratio', hidden=True)
fieldsModifier.configure_field('scan', hidden=True)
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
# Relation between projects and teams
formModifier = dbui.FormModifier('harvesters')
formModifier.link_comboboxes(master=db.harvesters.id_projects,
slave=db.harvesters.id_teams,
masterHasSlaveData='organisation',
slaveExtJS={'hidden': True})
# Relation between harvester controller and publications category
formModifier.link_comboboxes(master=db.harvesters.controller,
slave=db.harvesters.id_categories,
masterHasSlaveData='controllers',
slaveExtJS={'hidden': False})
formModifier.configure(width=350)
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('harvesters')
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', 'scan')
gridModifier.append_filter(('id_teams', '==', T('is equal to')))
gridModifier.append_filter(('id_projects', '==', T('is equal to')))
gridModifier.append_filter(('controller', 'contains', T('contains')))
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(plugins=[{'ptype': 'pGridRowEditorAddWizard',
'wizard' :{'xtype': 'xwizardharvester'}}])
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('harvesters')
storeModifier.orderby(db.teams.team, db.projects.project, db.harvesters.controller)
# -*- coding: utf-8 -*-
""" lists
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('lists')
fieldsModifier.configure_field('axis_label_converters', height=260)
fieldsModifier.configure_field('definition', height=233)
fieldsModifier.configure_field('sections', height=260)
for level in ('level_1', 'level_2', 'level_3', 'level_4'):
fieldsModifier.configure_field('axis_%s' % level,
itemId='axis_%s' % level,
displayField='AxesTr_axis',
valueField='AxesAxis',
refStore=dbui.get_store_id('axes'),
emptyText=T('Select axis...'),
userReset=True,
xtype='xcomboboxmaster')
fieldsModifier.configure_field('granularity_%s' % level,
masterItemId='axis_%s' % level,
masterValueField='AxesAxis',
displayField='AxesTr_granularity',
valueField='AxesGranularity',
refStore=dbui.get_store_id('axes'),
emptyText=T('Select granularity...'),
xtype='xcomboboxslave')
fieldsModifier.configure_field('direction_%s' % level, flex=0.5)
fieldsModifier.merge_fields('axis_%s' % level,
'granularity_%s' % level,
'direction_%s' % level,
fieldLabel=T(level.replace('_', ' ').title()))
#-------------------------------------------------------------------------------
#
# FORM CONFIGURATiON
#
#-------------------------------------------------------------------------------
formModifier = dbui.FormModifier('lists')
formModifier.merge_fields('list',
'definition',
title=T('General'))
formModifier.merge_fields('sections',
title=T('Sections'))
formModifier.merge_fields('axis_level_1',
'axis_level_2',
'axis_level_3',
'axis_level_4',
title=T('Sort by'))
formModifier.merge_fields('axis_label_converters',
title=T('Substitute'))
formModifier.merge_fields('header_flag',
'footer_flag',
title=T('Header / Footer'))
formModifier.set_mapper(dbui.map_tabpanel)
formModifier.configure(buttonAlign='right',
labelWidth=100,
labelAlign='right',
width=450,
defaults={'maxHeight': 310})
#-------------------------------------------------------------------------------
#
# GRID CONFIGURATiON
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('lists')
gridModifier.configure_column('list', width=60)
gridModifier.hide_columns('axis_level_1',
'axis_level_2',
'axis_level_3',
'axis_level_4',
'granularity_level_1',
'granularity_level_2',
'granularity_level_3',
'granularity_level_4',
'direction_level_1',
'direction_level_2',
'direction_level_3',
'direction_level_4',
'axis_label_converters',
'header_flag',
'footer_flag')
gridModifier.append_filter(('list', 'contains', T('contains')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
#-------------------------------------------------------------------------------
#
# STORE CONFIGURATiON
#
#-------------------------------------------------------------------------------
storeModifier = dbui.StoreModifier('lists')
storeModifier.orderby(db.lists.list)
# -*- coding: utf-8 -*-
""" metrics
"""
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('metrics')
fieldsModifier.configure_field('axis_label_converters', height=260)
fieldsModifier.configure_field('definition', height=233)
for el in ('vertical', 'horizontal'):