Donut Ding weg + Toggle mit Aktiv
Dieser Commit ist enthalten in:
@@ -49,13 +49,6 @@
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
/* Chart styles */
|
||||
.chart-container {
|
||||
position: relative;
|
||||
height: 100px;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
/* Progress bar styles */
|
||||
.progress-custom {
|
||||
height: 8px;
|
||||
@@ -101,9 +94,6 @@
|
||||
<div class="card-icon text-info">📋</div>
|
||||
<div class="card-value text-info">{{ stats.total_licenses }}</div>
|
||||
<div class="card-label text-muted">Lizenzen Gesamt</div>
|
||||
<div class="chart-container">
|
||||
<canvas id="licenseChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -348,46 +338,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1/dist/chart.min.js"></script>
|
||||
<script>
|
||||
// Donut Chart für Lizenzen
|
||||
const ctx = document.getElementById('licenseChart');
|
||||
if (ctx) {
|
||||
const licenseChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: ['Aktiv', 'Abgelaufen'],
|
||||
datasets: [{
|
||||
data: [{{ stats.active_licenses }}, {{ stats.expired_licenses }}],
|
||||
backgroundColor: ['#28a745', '#dc3545'],
|
||||
borderWidth: 0
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
const label = context.label || '';
|
||||
const value = context.parsed || 0;
|
||||
const total = context.dataset.data.reduce((a, b) => a + b, 0);
|
||||
const percentage = ((value / total) * 100).toFixed(1);
|
||||
return label + ': ' + value + ' (' + percentage + '%)';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
cutout: '70%'
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren