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
Open sidebar
limbra
limbra
Commits
7f6095e6
Commit
7f6095e6
authored
Jun 30, 2016
by
LE GAC Renaud
Browse files
Update the graph selector to add the author criteria.
parent
0cc84aa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
controllers/graphs.py
controllers/graphs.py
+1
-1
models/vt_graph_selector.py
models/vt_graph_selector.py
+1
-0
modules/graph_tools.py
modules/graph_tools.py
+4
-0
No files found.
controllers/graphs.py
View file @
7f6095e6
...
...
@@ -77,7 +77,7 @@ def index():
either as a linechart or as a stacked histograms.
"""
fields
=
(
'cumulative'
,
'id_graphs'
,
'time'
,
'year_start'
,
'year_end'
)
fields
=
(
'author'
,
'cumulative'
,
'id_graphs'
,
'time'
,
'year_start'
,
'year_end'
)
selector
=
Selector
(
virtdb
.
graph_selector
,
exclude_fields
=
fields
)
# graph configuration
...
...
models/vt_graph_selector.py
View file @
7f6095e6
...
...
@@ -13,6 +13,7 @@ virtdb.define_table('graph_selector',
Field
(
'id_teams'
,
'reference teams'
,
label
=
'Team'
),
Field
(
'id_projects'
,
'reference projects'
,
label
=
'Project'
),
Field
(
'id_categories'
,
'reference categories'
,
label
=
'Category'
),
Field
(
'author'
,
'string'
),
Field
(
'id_authors_roles'
,
'reference authors_roles'
,
label
=
'Role'
),
Field
(
'id_graphs'
,
'reference graphs'
,
label
=
'Graph'
),
Field
(
'cumulative'
,
'boolean'
,
default
=
True
),
...
...
modules/graph_tools.py
View file @
7f6095e6
...
...
@@ -230,6 +230,10 @@ def do_query(publications, selector):
elif
year_end
and
not
year_start
:
query
&=
publications
.
submitted
[
0
:
4
]
<=
year_end
if
selector
.
author
:
q_author
=
publications
.
authors_institute
.
contains
(
selector
.
author
)
query
&=
q_author
return
query
...
...
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