229 lines
4.7 KiB
HTML
229 lines
4.7 KiB
HTML
{% extends "adm/adm_base.html" %}
|
|
{% block content %}
|
|
{% load adm_tags %}
|
|
{% load humanize %}
|
|
{% load mathfilters %}
|
|
<div class="content-section col-12">
|
|
{% if statistik|length > 0 %}
|
|
{% getlaststat as statistik_last %}
|
|
<h4>Statistik vom {{statistik.0.staticdate|date:"d.m.Y"}} bis {{statistik_last.staticdate|date:"d.m.Y"}}
|
|
</h4>
|
|
{% else %}
|
|
<h4>Statisk noch nicht begonnen </h4>
|
|
{% endif %}
|
|
<hr>
|
|
<div class="chart-container" style="">
|
|
<canvas id="all_stats"></canvas>
|
|
</div>
|
|
<hr>
|
|
{% getMRR as finalmrr %}
|
|
<h5>MRR: {{finalmrr|floatformat:2|intcomma}} €</h5>
|
|
<hr>
|
|
<h5>Monatliche Umsätze</h5>
|
|
<table>
|
|
<thead>
|
|
<td style="min-width: 80px;">Monat</td>
|
|
<td>Umsatz</td>
|
|
</thead>
|
|
{% for m in money %}
|
|
<tr>
|
|
<td>
|
|
{{m.salesmonthdate|date:"m/Y"}}
|
|
</td>
|
|
<td>
|
|
{{m.value}} €
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h5>Zahlenübersicht stand jetzt</h5>
|
|
<table>
|
|
<tr>
|
|
<td style="min-width: 150px;">Agenturen</td>
|
|
<td>{{agencycount}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Nutzer</td>
|
|
<td>{{usercount}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Standards</td>
|
|
<td>{{standardcount}}</td>
|
|
</tr>
|
|
</table>
|
|
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.6/Chart.bundle.min.js"></script>
|
|
</tbody>
|
|
</table>
|
|
<hr>
|
|
<a href="{% url 'getorders' %}" target="_blank">Bestellungen der Notfallhilfe als CSV herunterladen</a>
|
|
</div>
|
|
<script>
|
|
new Chart(document.getElementById("all_stats"),{
|
|
"type":"line",
|
|
"data":
|
|
{
|
|
"labels":
|
|
[
|
|
{% for ele in statistik %}
|
|
"{{ele.staticdate|date:'d.m.Y'}}",
|
|
{% endfor %}
|
|
],
|
|
"datasets":[
|
|
{"label":"Agenturen",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.agencys}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#664AD9",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Nutzer",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.users}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#5DF0CB",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Standards",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.standards}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#FA746A",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"MRR",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.mrr|stringformat:".2f"}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#FA746A",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Chatnachrichten",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.chatmessages}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#FFFF99",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Aktive Abos",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.active_abos}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#009900",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Abwesenheiten",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.absenceobjects}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#CC00CC",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Nutzer mit Zeiterfassung",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.user_active_timemanagement}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#FFB266",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Organizerelemente",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.organizerobjects}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#6600CC",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Agenturen mit Notfallhilfenpasswort",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.agency_activerecover}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#FF0000",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Notfallhilfenelemente",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.agency_recoverobjects}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#990000",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Dateien",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.allfiles}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#CCCC00",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Speicherplatzverbrauch",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ ele.allfiles_storage|mul:0.000000000931|stringformat:".10f" }},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#666600",
|
|
"lineTension":0.1
|
|
},
|
|
{"label":"Gestrige Logins",
|
|
"data":[
|
|
{% for ele in statistik %}
|
|
{{ele.logins}},
|
|
{% endfor %}
|
|
],
|
|
"fill":false,
|
|
"borderColor":"#000099",
|
|
"lineTension":0.1
|
|
},
|
|
|
|
]
|
|
},
|
|
"options":{}});
|
|
</script>
|
|
<!--
|
|
|
|
logins = models.IntegerField(default=0)
|
|
|
|
|
|
|
|
-->
|
|
{% endblock content %}
|