Nothing currently flagged.
';
+ return;
+ }
+ list.innerHTML = attention.map(a => `
+ No events.
';
+ return;
+ }
+ body.innerHTML = events.map(e => `
+
+
${formatTime(e.timestamp)}
+
${e.severity}
+
+
${escapeHtml(e.message)}
+
${escapeHtml(e.workloadId)} · ${escapeHtml(e.reason || '')}
+
+
+ `).join('');
+}
+
+// ── Workload → detail-as-timeline navigation ──────────────────
+
+async function openWorkload(workloadId) {
+ state.data.scopeWorkload = workloadId;
+ const [nsSlug, name] = workloadId.replace('deployment/', '').split('/');
+ // Pull workload-scoped timeline — this REPLACES the generic one for rendering.
+ try {
+ const res = await api(`/api/workloads/${nsSlug}/${name}/timeline`);
+ state.data.timeline = res.items || [];
+ } catch (e) { setLive('error', e.message); }
+ switchView('timeline');
+}
+
+$('oumta-timeline-back')?.addEventListener('click', () => {
+ state.data.scopeWorkload = null;
+ // Restore the global timeline
+ api('/api/timeline').then(r => {
+ state.data.timeline = r.items || [];
+ renderTimeline();
+ }).catch(e => setLive('error', e.message));
+});
+
+// ── Realtime (SSE) with polling fallback ──────────────────────
+//
+// Plan: open an EventSource at