+1
-1
@@ -640,7 +640,7 @@ async function loadDashboard() {
|
||||
chartEl.innerHTML = `<div class="d-flex align-items-end gap-2" style="height:120px">${Object.entries(severityCounts).map(([sev, cnt]) => {
|
||||
const color = { critical: 'danger', warning: 'warning', info: 'info' }[sev] || 'secondary';
|
||||
const pct = maxVal > 0 ? (cnt / maxVal) * 100 : 0;
|
||||
return `<div class="d-flex flex-column align-items-center flex-fill" style="height:100%"><div class="bg-${color}" style="width:100%;height:${pct}%;min-height:4px;border-radius:4px 4px 0 0"></div><small class="mt-1">${sev}<br><strong>${cnt}</strong></small></div>`;
|
||||
return `<div class="d-flex flex-column align-items-center justify-content-end flex-fill" style="height:100%"><div class="bg-${color}" style="width:100%;height:${pct}%;min-height:4px;border-radius:4px 4px 0 0"></div><small class="mt-1" style="line-height:1">${sev}<br><strong>${cnt}</strong></small></div>`;
|
||||
}).join('')}</div>`;
|
||||
|
||||
document.getElementById('lastUpdated').textContent = 'Updated ' + new Date().toLocaleTimeString();
|
||||
|
||||
Reference in New Issue
Block a user