diff --git a/frontend/src/views/admin/ServicesStatusView.vue b/frontend/src/views/admin/ServicesStatusView.vue index 33c5a5b..1366ee4 100644 --- a/frontend/src/views/admin/ServicesStatusView.vue +++ b/frontend/src/views/admin/ServicesStatusView.vue @@ -218,16 +218,23 @@ export default { try { const data = JSON.parse(event.data); if (data.event === 'getConnectionsResponse') { - if (data.success) { - this.connections = data.data || []; + // Die Daemon-Antwort hat die Struktur: {event, total, unauthenticated, users: {userId: count}} + if (data.users && typeof data.users === 'object') { + // Transformiere das users-Objekt in ein Array für das Template + this.connections = Object.entries(data.users).map(([userId, connectionCount]) => ({ + userId: userId, + connectionCount: connectionCount, + connections: [] // Detaillierte Verbindungsinfos sind in der aktuellen Antwort nicht enthalten + })); this.error = null; } else { - this.error = data.error || this.$t('admin.servicesStatus.daemon.connections.error'); this.connections = []; + this.error = null; } } } catch (err) { console.error('Fehler beim Verarbeiten der Daemon-Nachricht:', err); + this.error = this.$t('admin.servicesStatus.daemon.connections.error'); } }, formatDuration(seconds) {