mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
Update system-logs.tsx
This commit is contained in:
@@ -181,6 +181,13 @@ export function SystemLogs() {
|
|||||||
setLoading(true)
|
setLoading(true)
|
||||||
setError(null)
|
setError(null)
|
||||||
|
|
||||||
|
// NOTE: Backend endpoints should filter data by current node only
|
||||||
|
// When a node belongs to a cluster, only show data for that specific node:
|
||||||
|
// - /api/logs - should return logs only from current node
|
||||||
|
// - /api/backups - should return backups only from current node
|
||||||
|
// - /api/events - should return events only from current node
|
||||||
|
// - /api/notifications - should return notifications only from current node
|
||||||
|
|
||||||
const [logsRes, backupsRes, eventsRes, notificationsRes] = await Promise.all([
|
const [logsRes, backupsRes, eventsRes, notificationsRes] = await Promise.all([
|
||||||
fetchSystemLogs(),
|
fetchSystemLogs(),
|
||||||
fetch(getApiUrl("/api/backups")),
|
fetch(getApiUrl("/api/backups")),
|
||||||
@@ -889,10 +896,8 @@ export function SystemLogs() {
|
|||||||
{log.timestamp}
|
{log.timestamp}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm text-foreground mb-1 line-clamp-2 break-words overflow-hidden">
|
<div className="text-sm text-foreground mb-1 truncate">{log.message}</div>
|
||||||
{log.message}
|
<div className="text-xs text-muted-foreground truncate">
|
||||||
</div>
|
|
||||||
<div className="text-xs text-muted-foreground break-words overflow-hidden">
|
|
||||||
{log.source}
|
{log.source}
|
||||||
{log.pid && ` • PID: ${log.pid}`}
|
{log.pid && ` • PID: ${log.pid}`}
|
||||||
{log.hostname && ` • Host: ${log.hostname}`}
|
{log.hostname && ` • Host: ${log.hostname}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user