diff --git a/logs/templates/logs/aff_charts.html b/logs/templates/logs/aff_charts.html
new file mode 100644
index 00000000..eeb29639
--- /dev/null
+++ b/logs/templates/logs/aff_charts.html
@@ -0,0 +1,27 @@
+{% comment %}
+Re2o est un logiciel d'administration développé initiallement au rezometz. Il
+se veut agnostique au réseau considéré, de manière à être installable en
+quelques clics.
+
+Copyright © 2017 Gabriel Détraz
+Copyright © 2017 Goulven Kermarec
+Copyright © 2017 Augustin Lemesle
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program 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. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+{% endcomment %}
+
+
+
+{{ ActiveUser.as_html }}
diff --git a/logs/templates/logs/sidebar.html b/logs/templates/logs/sidebar.html
index d2ee3002..f168756e 100644
--- a/logs/templates/logs/sidebar.html
+++ b/logs/templates/logs/sidebar.html
@@ -52,6 +52,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% trans "Users" %}
+
+
+ {% trans "Charts" %}
+
{% acl_end %}
{% endblock %}
diff --git a/logs/urls.py b/logs/urls.py
index 9398cfe4..af6c8536 100644
--- a/logs/urls.py
+++ b/logs/urls.py
@@ -39,6 +39,7 @@ urlpatterns = [
url(r'^stats_models/$', views.stats_models, name='stats-models'),
url(r'^stats_users/$', views.stats_users, name='stats-users'),
url(r'^stats_actions/$', views.stats_actions, name='stats-actions'),
+ url(r'^stats_charts/$', views.charts, name='stats-charts'),
url(
r'(?P\w+)/(?P\w+)/(?P[0-9]+)$',
views.history,
diff --git a/logs/views.py b/logs/views.py
index a54edd56..38562d1c 100644
--- a/logs/views.py
+++ b/logs/views.py
@@ -51,6 +51,9 @@ from django.utils.translation import ugettext as _
from reversion.models import Revision
from reversion.models import Version, ContentType
+from .charts import (
+ ActiveUserChart,
+)
from users.models import (
User,
ServiceUser,
@@ -533,3 +536,14 @@ def history(request, application, object_name, object_id):
{'reversions': reversions, 'object': instance}
)
+@login_required
+def charts(request):
+ """Sert les graphiques des statistiques"""
+
+ ActiveUser = ActiveUserChart()
+
+ return render(
+ request,
+ 'logs/aff_charts.html',
+ {'ActiveUser': ActiveUser}
+ )