From 5e9abc6f68e7206fb7196dbbfc8fefd8ec2bbfd4 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Thu, 9 Feb 2017 11:19:05 +0100 Subject: [PATCH] [statistics] added plotterparameters count on main page --- .../statistics/templates/statistics/panels/status.html | 9 +++++---- beat/web/statistics/views.py | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/beat/web/statistics/templates/statistics/panels/status.html b/beat/web/statistics/templates/statistics/panels/status.html index c99850e84..4724ea241 100644 --- a/beat/web/statistics/templates/statistics/panels/status.html +++ b/beat/web/statistics/templates/statistics/panels/status.html @@ -1,21 +1,21 @@ {% comment %} * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ * Contact: beat.support@idiap.ch - * + * * This file is part of the beat.web module of the BEAT platform. - * + * * Commercial License Usage * Licensees holding valid commercial BEAT licenses may use this file in * accordance with the terms contained in a written agreement between you * and Idiap. For further information contact tto@idiap.ch - * + * * Alternatively, this file may be used under the terms of the GNU Affero * Public License version 3 as published by the Free Software and appearing * in the file LICENSE.AGPL included in the packaging of this file. * The BEAT platform is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. - * + * * You should have received a copy of the GNU Affero Public License along * with the BEAT platform. If not, see http://www.gnu.org/licenses/. {% endcomment %} @@ -31,6 +31,7 @@ <a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'search:public-list' %}{% else %}{% url 'search:list' request.user.username %}{% endif %}" title="Show searches" data-toggle="tooltip" data-placement="left">Searches <span class="badge">{{ totals.searches }}</span></a> <a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'reports:public-list' %}{% else %}{% url 'reports:list' request.user.username %}{% endif %}" title="Show reports" data-toggle="tooltip" data-placement="left">Reports <span class="badge">{{ totals.reports }}</span></a> <a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'plotters:list' %}{% else %}{% url 'plotters:list' %}{% endif %}" title="Show plotters" data-toggle="tooltip" data-placement="left">Plotters <span class="badge">{{ totals.plotters}}</span></a> + <a class="list-group-item" href="{% if request.user.is_anonymous %}{% url 'plotters:plotterparameter-public-list' %}{% else %}{% url 'plotters:plotterparameter-list' request.user.username %}{% endif %}" title="Show plotters" data-toggle="tooltip" data-placement="left">Plotterparameters <span class="badge">{{ totals.plotterparameters}}</span></a> <a class="list-group-item" href="{% url 'databases:list' %}" title="Show databases" data-toggle="tooltip" data-placement="left">Databases <span class="badge">{{ totals.databases }}</span></a> <div class="list-group-item">Users <span class="badge">{{ totals.users }}</span></div> </div> diff --git a/beat/web/statistics/views.py b/beat/web/statistics/views.py index fa645d0d0..d13a7e073 100644 --- a/beat/web/statistics/views.py +++ b/beat/web/statistics/views.py @@ -54,6 +54,7 @@ def calculate_totals(): from ..attestations.models import Attestation from ..reports.models import Report from ..plotters.models import Plotter + from ..plotters.models import PlotterParameter from ..search.models import Search # for calculating the total cpu time, we use the HourlyStatistics and @@ -104,6 +105,7 @@ def calculate_totals(): searches=Search.objects.count(), reports=Report.objects.count(), plotters=Plotter.objects.count(), + plotterparameters=PlotterParameter.objects.count(), ) -- GitLab