diff options
Diffstat (limited to 'src/templates/apps')
-rw-r--r-- | src/templates/apps/room/list.html | 2 | ||||
-rw-r--r-- | src/templates/apps/stats/domain.html | 4 | ||||
-rw-r--r-- | src/templates/apps/stats/room.html | 32 | ||||
-rw-r--r-- | src/templates/apps/stats/user.html | 2 |
4 files changed, 37 insertions, 3 deletions
diff --git a/src/templates/apps/room/list.html b/src/templates/apps/room/list.html index c314f4b..5de2221 100644 --- a/src/templates/apps/room/list.html +++ b/src/templates/apps/room/list.html @@ -39,7 +39,7 @@ {% if r.self_cleaning %}<li>» Room will be reset when empty.</li>{%else%}<li>» Room state is preserved between sessions.</li>{% endif %} {% if r.allow_host %}<li>» First participant can elect to become host.</li>{% endif %} {% if r.lastvisited %}<li>» Last visited {{r.lastvisited|datehumanize}}</li>{%endif%} - <li>» Hosted on {{r.acc.name}}</li> + <li>» Hosted on {{r.acc.name}} <a href="{% prefix %}/stats/room/{{r.id}}">(usage statistics)</a></li> </ul> <br/> <ul class="ilist"> diff --git a/src/templates/apps/stats/domain.html b/src/templates/apps/stats/domain.html index 8f86976..93fb1a9 100644 --- a/src/templates/apps/stats/domain.html +++ b/src/templates/apps/stats/domain.html @@ -15,6 +15,7 @@ $.ajax({ }); $('#minutes').append(resp['minutes']); $('#rooms').append(resp['rooms']); + $('#users').append(resp['users']); } }); {% endblock %} @@ -26,7 +27,8 @@ $.ajax({ <table> <tr><td><b>Total minutes:</b></td><td id="minutes"></td></tr> <tr><td><b>Total rooms:</b></td><td id="rooms"></td></tr> + <tr><td><b>Total unique users:</b></td><td id="users"></td></tr> + <tr><td colspan="2" style="padding-top: 10px;"><a href="{% prefix %}/stats">Look at your own statistics</a></td></tr> </table> -<a href="{% prefix %}/stats">Look at your own statistics</a> </div> {% endblock %}
\ No newline at end of file diff --git a/src/templates/apps/stats/room.html b/src/templates/apps/stats/room.html new file mode 100644 index 0000000..7a2a25f --- /dev/null +++ b/src/templates/apps/stats/room.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load datehumanize %} +{% load prefix %} +{% block widgets %} +$.ajax({ + url: '{% prefix %}/api/stats/room/{{room.id}}', + method: 'GET', + success: function (resp) { + var graph = $('#graph'); + series = [{label: 'Meeting minutes for {{room.name}}',data: resp['data']}]; + $.plot(graph,series,{ + lines: { show: true }, + points: { show: true }, + xaxis: { mode: "time" } + }); + $('#minutes').append(resp['minutes']); + $('#users').append(resp['users']); + } +}); +{% endblock %} +{% block content %} +<h1>Meeting statistics for {{room.name}}</h1> +<div id="graph" style="width:600px;height:300px; display: block; float: left; margin-right: 30px;"></div> +<div> +<h2>Summary</h2> +<table> + <tr><td><b>Total minutes:</b></td><td id="minutes"></td></tr> + <tr><td><b>Total unique users:</b></td><td id="users"></td></tr> + <tr><td colspan="2" style="padding-top: 10px;"><a href="{% prefix %}/stats">Look at your own statistics</a></td></tr> +</table> +</div> +{% endblock %}
\ No newline at end of file diff --git a/src/templates/apps/stats/user.html b/src/templates/apps/stats/user.html index 73c4fb9..486c9be 100644 --- a/src/templates/apps/stats/user.html +++ b/src/templates/apps/stats/user.html @@ -26,7 +26,7 @@ $.ajax({ <table> <tr><td><b>Total minutes:</b></td><td id="minutes"></td></tr> <tr><td><b>Total rooms:</b></td><td id="rooms"></td></tr> + <tr><td colspan="2" style="padding-top: 10px;"><a href="{% prefix %}/stats/domain/{{domain}}">Look at statistics for {{domain}}</a></td></tr> </table> -<a href="{% prefix %}/stats/{{domain}}">Look at statistics for {{domain}}</a> </div> {% endblock %}
\ No newline at end of file |