Logging erweitert

This commit is contained in:
2025-07-23 11:29:47 +02:00
parent 09cf3706e4
commit 5c4f419895
2 changed files with 37 additions and 1 deletions

View File

@@ -21,12 +21,40 @@
<div class="stats-label">Gesamt-Pageviews:</div>
<div class="stats-value">{{ pageviews }}</div>
</div>
<div class="chart-container">
<canvas id="imprChart" width="400" height="180"></canvas>
</div>
<div class="chart-container">
<canvas id="funcChart" width="400" height="220"></canvas>
</div>
<a href="/" style="color:#2563eb;">Zurück zur App</a>
</div>
<script>
// Impressions pro Tag
const imprData = {{ impressions_per_day|tojson }};
const imprLabels = Object.keys(imprData);
const imprCounts = Object.values(imprData);
new Chart(document.getElementById('imprChart').getContext('2d'), {
type: 'line',
data: {
labels: imprLabels,
datasets: [{
label: 'Impressions/Tag',
data: imprCounts,
borderColor: '#059669',
backgroundColor: 'rgba(5,150,105,0.1)',
tension: 0.2,
fill: true
}]
},
options: {
plugins: { legend: { display: true } },
scales: {
y: { beginAtZero: true, ticks: { stepSize: 1 } }
}
}
});
// Funktionsaufrufe
const funcCounts = {{ func_counts|tojson }};
const labels = Object.keys(funcCounts);
const data = Object.values(funcCounts);