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

Migrate to plugin_dbui 0.6.1.14 and rename dashboard_selector as linechart_selector.

parent 9a489711
......@@ -20,12 +20,12 @@ def dashboard():
"""
selector = Storage()
selector.Dashboard_selectorCumulative = True
selector.Dashboard_selectorId = ''
selector.Dashboard_selectorId_projects = ''
selector.Dashboard_selectorId_teams = ''
selector.Dashboard_selectorYear_start = datetime.now().year
selector.Dashboard_selectorYear_end = ''
selector.Linechart_selectorCumulative = True
selector.Linechart_selectorId = ''
selector.Linechart_selectorId_projects = ''
selector.Linechart_selectorId_teams = ''
selector.Linechart_selectorYear_start = datetime.now().year
selector.Linechart_selectorYear_end = ''
redirect(URL('graphs', 'linechart', vars=selector))
......@@ -37,7 +37,7 @@ def linechart():
"""
# get the user constraint.
selector = Selector(virtdb.dashboard_selector,
selector = Selector(virtdb.linechart_selector,
exclude_fields=('cumulative',
'year_start',
'year_end'))
......
# -*- coding: utf-8 -*-
""" dashboard_selector (virtual table)
""" linechart_selector (virtual table)
"""
#-------------------------------------------------------------------------------
......@@ -7,23 +7,22 @@
# DEFINITION
#
#-------------------------------------------------------------------------------
virtdb.define_table('dashboard_selector',
virtdb.define_table('linechart_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('cumulative', 'boolean'))
Field('cumulative', 'boolean', default=True))
virtdb.dashboard_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.dashboard_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
virtdb.linechart_selector.id_projects.requires = IS_IN_DB(db, 'projects.project')
virtdb.linechart_selector.id_teams.requires = IS_IN_DB(db, 'teams.team')
#-------------------------------------------------------------------------------
#
# FIELDS CONFIGURATiON
#
#-------------------------------------------------------------------------------
fieldsModifier = dbui.FieldsModifier('dashboard_selector')
fieldsModifier.configure_field('cumulative', checked=True)
fieldsModifier = dbui.FieldsModifier('linechart_selector')
fieldsModifier.configure_field('year_start', flex=1)
fieldsModifier.configure_field('year_end', flex=1)
fieldsModifier.merge_fields('year_start', 'year_end', fieldLabel=T('Year'))
......
......@@ -162,7 +162,7 @@ listLeaf = PanelWithUrlSelector(virtdb.list_selector,
extField='format',
plugins=['pMathJax'])
lineChartLeaf = PanelWithUrlSelector(virtdb.dashboard_selector,
lineChartLeaf = PanelWithUrlSelector(virtdb.linechart_selector,
baseUrl=URL('graphs', 'linechart'))
metricLeaf = PanelWithUrlSelector(virtdb.metric_selector,
......
......@@ -2,11 +2,9 @@
""" countries
List of countries extract from the geographical database www.geonames.org:
1) get the file countryInfo.txt
from http://download.geonames.org/export/dump/
2) open the file with libreoffice calc
1. get the file C{countryInfo.txt}
from U{http://download.geonames.org/export/dump/}
2. open the file with libreoffice calc
and remove all columns but the country names
Extract in Nov. 2014
......
......@@ -2,7 +2,7 @@
HEAD
- Require plugin_dbui 0.6.1.13 or later version.
- Require plugin_dbui 0.6.1.14 or later version.
Backward compatibility is broken (report interfaces, country default, ...).
The table axes, lists, metrics and publications have to be recreated.
- Remove all reference to CPPM.
......
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