1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-17 23:24:20 +00:00
royalnet/templates/activity.html

158 lines
6.5 KiB
HTML
Raw Normal View History

2018-11-18 16:38:02 +00:00
{% extends 'base.html' %}
{% block prehead %}
<meta name="description" content="Statistiche sull'attività della Royal Games">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.js" integrity="sha384-DhLzB4p1BEBSNugP/gw0UBLxHx7kHgldDGYtGinCssfp4HK+sG4ByZDau4pWmpqG" crossorigin="anonymous"></script>
{% endblock %}
2018-11-18 16:59:54 +00:00
{% block title %}
Attività
{% endblock %}
2018-11-18 16:38:02 +00:00
{% block pagetitle %}
{{ game_name }}
{% endblock %}
{% block body %}
<div class="discord-activity">
<h1>
Attività su Discord
</h1>
2018-11-18 22:04:02 +00:00
<canvas class="graph members-graph-7d" id="discord-members-graph-7d" height="40"></canvas>
2018-11-18 16:38:02 +00:00
<script>
new Chart("discord-members-graph-7d",
{
"type": "line",
"data": {
"labels": [
{% for point in activityreports %}
2018-11-18 16:59:54 +00:00
"{{ point.timestamp.strftime("%a %H:%M") }}",
2018-11-18 16:38:02 +00:00
{% endfor %}
],
"datasets": [
{
2018-11-18 22:04:02 +00:00
"label": "In cv",
"borderColor": "#fe7f00",
"backgroundColor": "#fe7f0022",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
2018-11-18 16:38:02 +00:00
"data": [
{% for point in activityreports %}
2018-11-18 22:04:02 +00:00
{{ point.discord_members_cv }},
2018-11-18 16:38:02 +00:00
{% endfor %}
]
},
{
"label": "In game",
"borderColor": "#9ae915",
2018-11-18 22:04:02 +00:00
"backgroundColor": "#9ae91511",
"borderWidth": 1,
"borderDash": [2],
"cubicInterpolationMode": "monotone",
"fill": "disabled",
2018-11-18 16:38:02 +00:00
"data": [
{% for point in activityreports %}
{{ point.discord_members_ingame }},
{% endfor %}
]
},
{
2018-11-18 22:04:02 +00:00
"label": "Online",
"borderColor": "#6dcff6",
"backgroundColor": "#6dcff611",
"borderWidth": 1,
"cubicInterpolationMode": "monotone",
"fill": 0,
"data": [
{% for point in activityreports %}
{{ point.discord_members_online }},
{% endfor %}
]
}
]
},
"options":{
}
});
</script>
<canvas class="graph cv-graph-7d" id="discord-cv-graph-7d" height="40"></canvas>
<script>
new Chart("discord-cv-graph-7d",
{
"type": "line",
"data": {
"labels": [
{% for point in activityreports %}
"{{ point.timestamp.strftime("%a %H:%M") }}",
{% endfor %}
],
"datasets": [
{
"label": "Membri in cv",
"borderColor": "#a0ccff",
"backgroundColor": "#a0ccff22",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
2018-11-18 16:38:02 +00:00
"data": [
{% for point in activityreports %}
{{ point.discord_members_cv }},
{% endfor %}
]
},
2018-11-18 22:04:02 +00:00
{
"label": "Utenti in cv",
"borderColor": "#ffff00",
"backgroundColor": "#ffff0011",
"borderWidth": 2,
"cubicInterpolationMode": "monotone",
"fill": 0,
"data": [
{% for point in activityreports %}
{{ point.discord_cv }},
{% endfor %}
]
},
]
},
"options":{
}
});
</script>
<canvas class="graph channels-graph-7d" id="discord-channels-graph-7d" height="40"></canvas>
<script>
new Chart("discord-channels-graph-7d",
{
"type": "line",
"data": {
"labels": [
{% for point in activityreports %}
"{{ point.timestamp.strftime("%a %H:%M") }}",
{% endfor %}
],
"datasets": [
{
"label": "Canali utilizzati",
"borderColor": "#ff0000",
"backgroundColor": "#ff000022",
"borderWidth": 2,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in activityreports %}
{{ point.discord_channels_used }},
{% endfor %}
]
}
2018-11-18 16:38:02 +00:00
]
},
"options":{
}
});
</script>
</div>
{% endblock %}