- {/* ── Metrics Strip (50px) ────────────────────────────────────── */}
- {[
- { label: tDashboard('activeIncidents'), value: incidents?.length ?? '--', sub: incidents?.filter((i) => i.severity === 'P0').length ? `+${incidents.filter((i) => i.severity === 'P0').length} P0` : tDashboard('stable') },
- { label: tDashboard('serviceHealth'), value: `${pulseMetrics?.length ?? '--'}/${pulseMetrics?.length ?? '--'}`, sub: tDashboard('normal') },
- { label: tDashboard('todayIncidents'), value: incidents?.length ?? '--', sub: '' },
- { label: tDashboard('autoRemediationRate'), value: autoRemediationRate, sub: '' },
- { label: tDashboard('mttrAvg'), value: mttrAvg, sub: '' },
- ].map((m, i, arr) => (
-
+ {metrics.map((m, i) => (
+
+ {/* Label */}
+
+ {m.label}
+
+ {/* Value row */}
+
+
+ {String(m.value)}
+
+ {m.sparkline && (
+
+ )}
+
+ {/* Sub row */}
+
+ {m.badge ? (
+
+ {m.badge.text}
+
+ ) : m.sub ? (
+ {m.sub}
+ ) : null}
+
+
+ ))}
+
+
+ {/* ── 主體 2 欄 ─────────────────────────────────────────────────────── */}
+
+
+ {/* ── Feed:活躍事件 (flex:1) ───────────────────────────────────── */}
+
-
- {m.label}
-
-
- {String(m.value)}
-
- {m.sub && {m.sub}}
-
- ))}
-
-
- {/* ── 主體 2 欄(Sidebar 外部)────────────────────────────────── */}
-
-
- {/* ── Feed:活躍事件(flex:1)──────────────────────────────── */}
-
- {/* Feed 標題列 */}
-
-
- {tDashboard('activeIncidents')}
-
- {(incidents?.length ?? 0) > 0 && (
-
- {incidents?.length}
+
+
+ {tDashboard('activeIncidents')}
- )}
+ {(incidents?.length ?? 0) > 0 && (
+
+ {incidents?.length}
+
+ )}
+
+
+
+ {isIncidentsLoading ? (
+
+ {tCommon('loading')}
+
+ ) : incidentsError ? (
+
{incidentsError}
+ ) : (incidents?.length ?? 0) === 0 ? (
+
+
+
{tDashboard('stable')} · 0 {tDashboard('activeIncidents')}
+
+ ) : (
+ incidents?.map((incident) => (
+
+ ))
+ )}
+
- {/* Feed 內容 */}
-
- {isIncidentsLoading ? (
-
- {tCommon('loading')}
-
- ) : incidentsError ? (
-
{incidentsError}
- ) : (incidents?.length ?? 0) === 0 ? (
-
-
-
{tDashboard('stable')} · 0 {tDashboard('activeIncidents')}
-
- ) : (
- incidents?.map((incident) => (
-
+
+
+ {/* WoooClaw + Reasoning Stream */}
+
+
+ {tDashboard('openclawEngine')}
+
+
0 ? 'analyzing' : 'patrolling'}
/>
- ))
- )}
-
-
-
- {/* ── Right Panel:AI + Infra(flex:1)─────────────────────── */}
-
-
-
- {/* 7.1 NemoClaw + Reasoning Stream */}
-
-
- {tDashboard('openclawEngine')}
-
0 ? 'analyzing' : 'patrolling'
- }
- />
-
- {/* 7.3 基礎架構 2×2 Grid */}
-
-
- {tDashboard('infrastructure')}
+ {/* 基礎架構 Grid */}
+
+
+ {tDashboard('infrastructure')}
+
+
({
+ hostname: h.name,
+ ip: h.ip,
+ cpuPct: h.metrics?.cpu_percent ?? null,
+ ramPct: h.metrics?.memory_percent ?? null,
+ services: h.services.map(s => ({
+ name: s.name,
+ healthy: s.status === 'up' || s.status === 'healthy',
+ })),
+ }))} />
-
({
- hostname: h.name,
- ip: h.ip,
- cpuPct: h.metrics?.cpu_percent ?? null,
- ramPct: h.metrics?.memory_percent ?? null,
- services: h.services.map(s => ({
- name: s.name,
- healthy: s.status === 'up' || s.status === 'healthy',
- })),
- }))} />
-
+
-
)
}