update monitor

This commit is contained in:
2026-01-04 16:22:27 +01:00
parent e0fa3018ea
commit 16bbc930a8
5 changed files with 163 additions and 36 deletions

View File

@@ -509,18 +509,34 @@
// Update Services
const serviceList = document.getElementById('service-list');
serviceList.innerHTML = data.services.map(s => `
<li class="service-item">
<div class="service-name">
<img src="${getServiceLogo(s.name)}" class="service-logo" onerror="this.src='https://via.placeholder.com/32?text=${s.name.charAt(0)}'">
${s.name}
</div>
<div class="service-status" style="color: ${s.status === 'online' ? 'var(--status-green)' : 'var(--status-red)'}">
<i class="fas ${s.status === 'online' ? 'fa-check-circle' : 'fa-times-circle'}"></i>
${s.status === 'online' ? s.latency : 'Offline'}
</div>
</li>
`).join('');
serviceList.innerHTML = data.services.map(s => {
let statusColor = 'var(--status-red)';
let statusIcon = 'fa-times-circle';
let statusText = s.status;
if (s.status === 'online') {
statusColor = 'var(--status-green)';
statusIcon = 'fa-check-circle';
statusText = s.latency;
} else if (s.status === 'partial') {
statusColor = 'var(--status-yellow)';
statusIcon = 'fa-exclamation-circle';
statusText = 'Partial';
}
return `
<li class="service-item">
<div class="service-name">
<img src="${getServiceLogo(s.name)}" class="service-logo" onerror="this.src='https://via.placeholder.com/32?text=${s.name.charAt(0)}'">
${s.name}
</div>
<div class="service-status" style="color: ${statusColor}">
<i class="fas ${statusIcon}"></i>
${statusText}
</div>
</li>
`;
}).join('');
document.getElementById('loading').style.opacity = '0';
setTimeout(() => document.getElementById('loading').style.display = 'none', 500);
@@ -537,7 +553,8 @@
'Draw.io': 'https://app.diagrams.net/images/logo-flat.svg',
'TestArena': '/static/testarena.png',
'TBM': '/static/tbm.ico',
'Board': 'https://excalidraw.com/favicon-32x32.png'
'Board': 'https://excalidraw.com/favicon-32x32.png',
'TestArena Backend': '/static/testarena.png'
};
return logos[name] || '';
}