Lizenzserver - Integration Admin Panel

Dieser Commit ist enthalten in:
2025-06-18 22:03:46 +02:00
Ursprung ab3db0ab0d
Commit 86d805c392
21 geänderte Dateien mit 3110 neuen und 26 gelöschten Zeilen

Datei anzeigen

@@ -365,6 +365,7 @@ function updateLicenseView(customerId, licenses) {
<th>Gültig von</th>
<th>Gültig bis</th>
<th>Status</th>
<th>Server Status</th>
<th>Ressourcen</th>
<th>Aktionen</th>
</tr>
@@ -378,6 +379,26 @@ function updateLicenseView(customerId, licenses) {
const typeClass = license.license_type === 'full' ? 'bg-primary' : 'bg-secondary';
// License Server Status
let serverStatusHtml = '';
if (license.recent_heartbeats > 0) {
serverStatusHtml = `<span class="badge bg-success" title="Aktiv - ${license.active_server_devices} Geräte">💚 Online</span>`;
if (license.unresolved_anomalies > 0) {
serverStatusHtml += `<br><span class="badge bg-danger" title="${license.unresolved_anomalies} ungelöste Anomalien">⚠️ ${license.unresolved_anomalies}</span>`;
}
} else if (license.last_heartbeat) {
const lastSeen = new Date(license.last_heartbeat);
const minutesAgo = Math.floor((new Date() - lastSeen) / 60000);
if (minutesAgo < 60) {
serverStatusHtml = `<span class="badge bg-warning" title="Zuletzt vor ${minutesAgo} Min">⏱️ ${minutesAgo} Min</span>`;
} else {
const hoursAgo = Math.floor(minutesAgo / 60);
serverStatusHtml = `<span class="badge bg-secondary" title="Zuletzt vor ${hoursAgo}h">💤 Offline</span>`;
}
} else {
serverStatusHtml = `<span class="badge bg-secondary">-</span>`;
}
// Erstelle Ressourcen-HTML mit Details
let resourcesHtml = '';
const actualDomainCount = license.actual_domain_count || 0;
@@ -425,6 +446,7 @@ function updateLicenseView(customerId, licenses) {
<td>${license.valid_from || '-'}</td>
<td>${license.valid_until || '-'}</td>
<td><span class="badge ${statusClass}">${license.status}</span></td>
<td>${serverStatusHtml}</td>
<td class="resources-cell">
${resourcesHtml || '<span class="text-muted">-</span>'}
</td>