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

281 lines
12 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>
2019-01-03 11:35:41 +00:00
Attività su Discord negli ultimi 7 giorni
2018-11-18 16:38:02 +00:00
</h1>
2019-01-25 18:44:46 +00:00
<canvas class="graph members-graph-7d" id="discord-members-graph-7d" height="60px"></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>
2019-01-25 18:44:46 +00:00
<canvas class="graph cv-graph-7d" id="discord-cv-graph-7d" height="60px"></canvas>
2018-11-18 22:04:02 +00:00
<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>
2019-01-25 18:44:46 +00:00
<canvas class="graph channels-graph-7d" id="discord-channels-graph-7d" height="60px"></canvas>
2018-11-18 22:04:02 +00:00
<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":{
2019-01-25 19:35:14 +00:00
}
});
</script>
<h1>
2019-02-22 00:39:54 +00:00
Attività per ogni ora nell'ultimo mese
2019-01-25 19:35:14 +00:00
</h1>
<canvas class="graph members-graph-hour-bucket" id="discord-members-hour-bucket" height="60px"></canvas>
<script>
new Chart("discord-members-hour-bucket",
{
"type": "line",
"data": {
"labels": [
{% for point in hourly_avg %}
"{{ point.h|int }}:00",
{% endfor %}
],
"datasets": [
{
"label": "In cv",
"borderColor": "#fe7f00",
"backgroundColor": "#fe7f0022",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in hourly_avg %}
{{ point.cv_members_avg }},
{% endfor %}
]
},
{
"label": "In game",
"borderColor": "#9ae915",
"backgroundColor": "#9ae91511",
"borderWidth": 1,
"borderDash": [2],
"cubicInterpolationMode": "monotone",
"fill": "disabled",
"data": [
{% for point in hourly_avg %}
{{ point.ingame_members_avg }},
{% endfor %}
]
},
{
"label": "Online",
"borderColor": "#6dcff6",
"backgroundColor": "#6dcff611",
"borderWidth": 1,
"cubicInterpolationMode": "monotone",
"fill": 0,
"data": [
{% for point in hourly_avg %}
{{ point.online_members_avg }},
{% endfor %}
]
}
]
},
"options":{
2019-02-22 00:39:54 +00:00
}
});
</script>
<h1>
Confronto cv con il mese scorso
</h1>
<canvas class="graph members-graph-hour-comp" id="discord-members-hour-comp" height="60px"></canvas>
<script>
new Chart("discord-members-hour-comp",
{
"type": "line",
"data": {
"labels": [
{% for point in hourly_avg %}
"{{ point.h|int }}:00",
{% endfor %}
],
"datasets": [
{
"label": "Adesso",
"borderColor": "#a0ccff",
"backgroundColor": "#a0ccff22",
"borderWidth": 4,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in hourly_avg %}
{{ point.cv_members_avg }},
{% endfor %}
]
},
{
"label": "Il mese scorso",
"borderColor": "#d3a1ff",
"backgroundColor": "#d3a1ff11",
"borderWidth": 1,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in hourly_comp %}
{{ point.cv_members_avg }},
{% endfor %}
]
},
{
"label": "Il mese prima",
"borderColor": "#ffa3d0",
"backgroundColor": "#ffa3d011",
"borderWidth": 1,
"cubicInterpolationMode": "monotone",
"fill": "origin",
"data": [
{% for point in hourly_before %}
{{ point.cv_members_avg }},
{% endfor %}
]
}
]
},
"options":{
2018-11-18 16:38:02 +00:00
}
});
</script>
</div>
{% endblock %}