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

Commit 5341f1ae authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Re-organize the graph dashboard.

parent 930a30dd
......@@ -35,8 +35,8 @@ def dashboard():
cfg.Graph_selectorId_graphs = ''
cfg.Graph_selectorId_projects = ''
cfg.Graphs_selectorId_teams = ''
cfg.Graph_selectorTime = T('month')
cfg.Graph_selectorYear_start = datetime.now().year
cfg.Graph_selectorTime = ''
cfg.Graph_selectorYear_start = ''
cfg.Graph_selectorYear_end = ''
request.vars.update(cfg)
......@@ -45,20 +45,23 @@ def dashboard():
selector = Selector(virtdb.graph_selector, exclude_fields=fields)
# figure layout
fig, axes = plt.subplots(nrows=1, ncols=2, sharey=True)
fig.subplots_adjust(wspace=0.1)
# the cumulative sum of publications for the current year
do_linechart(db.publications, selector, target=axes[0])
do_labels(axes[0], "", T(TITLE_Y))
fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2, sharey=True)
fig.subplots_adjust(wspace=0.)
# histogram of the number of publications per year
selector.cumulative = False
selector.time = T('year')
selector.year_start = ''
do_linechart(db.publications, selector, target=axes[1])
do_labels(axes[1], "", "")
do_linechart(db.publications, selector, target=ax1)
do_labels(ax1, "", T(TITLE_Y))
# the cumulative sum of publications for the current year
selector.cumulative = True
selector.time = T('month')
selector.year_start = datetime.now().year
do_linechart(db.publications, selector, target=ax2)
# delegate the rendering to the view
response.view = "graphs/index.html"
......
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