From 4b0e1df7a77b74cbd7cb88b79de11de860abd4a2 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 17 Jan 2012 10:52:47 +0100 Subject: basic user and domain statistics --- src/templates/apps/stats/domain.html | 32 ++++++++++++++++++++++++++++++++ src/templates/apps/stats/user.html | 32 ++++++++++++++++++++++++++++++++ src/templates/base.html | 2 ++ 3 files changed, 66 insertions(+) create mode 100644 src/templates/apps/stats/domain.html create mode 100644 src/templates/apps/stats/user.html (limited to 'src/templates') diff --git a/src/templates/apps/stats/domain.html b/src/templates/apps/stats/domain.html new file mode 100644 index 0000000..94e500d --- /dev/null +++ b/src/templates/apps/stats/domain.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load datehumanize %} +{% load prefix %} +{% block widgets %} +$.ajax({ + url: '{% prefix %}/api/stats/domain/{{domain}}', + method: 'GET', + success: function (resp) { + var graph = $('#graph'); + series = [{label: 'Meeting minutes for {{domain}}',data: resp['data']}]; + $.plot(graph,series,{ + lines: { show: true }, + points: { show: true }, + xaxis: { mode: "time" } + }); + $('#minutes').append(resp['minutes']); + $('#rooms').append(resp['rooms']); + } +}); +{% endblock %} +{% block content %} +

Meeting statistics for {{domain}}

+
+
+

Summary

+ + + +
Total minutes:
Total rooms:
+Look at your own statistics +
+{% endblock %} \ No newline at end of file diff --git a/src/templates/apps/stats/user.html b/src/templates/apps/stats/user.html new file mode 100644 index 0000000..4faacfd --- /dev/null +++ b/src/templates/apps/stats/user.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load datehumanize %} +{% load prefix %} +{% block widgets %} +$.ajax({ + url: '{% prefix %}/api/stats/user/{{user.username}}', + method: 'GET', + success: function (resp) { + var graph = $('#graph'); + series = [{label: 'Meeting minutes for {{user}}',data: resp['data']}]; + $.plot(graph,series,{ + lines: { show: true }, + points: { show: true }, + xaxis: { mode: "time" } + }); + $('#minutes').append(resp['minutes']); + $('#rooms').append(resp['rooms']); + } +}); +{% endblock %} +{% block content %} +

Meeting statistics for {{user}}

+
+
+

Summary

+ + + +
Total minutes:
Total rooms:
+Look at statistics for {{domain}} +
+{% endblock %} \ No newline at end of file diff --git a/src/templates/base.html b/src/templates/base.html index 66a70ed..1541252 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -16,6 +16,8 @@ + + -- cgit v1.1