Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8b8cc24
v2.0.0-beta: 10 autonomous cron workflows + CTO self-merge
germanf Jul 3, 2026
aef15a8
v2.1.0-beta: Phase B — Memory & Self-Improvement (#121)
germanf Jul 3, 2026
8d5bb68
5.3.c — Health check expansion: memory, CPU, backup, MCP, backends
Jul 7, 2026
2843b80
Merge pull request #123 from germanf/feature/health-check-expansion
germanf Jul 7, 2026
21e4d48
5.3.a — Alerting system: webhook channel, REST API, health integratio…
Jul 7, 2026
23f8981
Merge pull request #126 from germanf/feature/alerting-system
germanf Jul 7, 2026
6696218
5.4.a — Real-time SSE Jobs Page: job list + live log viewer with Even…
Jul 7, 2026
6932311
Merge pull request #127 from germanf/feature/realtime-jobs
germanf Jul 7, 2026
8224879
5.1.a — Map-Reduce in Orchestrator: backend factory + endpoint, front…
Jul 7, 2026
7cc90f1
fix: parallelism validation, empty input guard, chunk denominator
Jul 7, 2026
f423b15
Merge pull request #128 from germanf/feature/map-reduce
germanf Jul 9, 2026
06efd24
5.4.b — Alert UI in Dashboard: Active Alerts widget with polling + ac…
Jul 9, 2026
d71689b
fix: ack error handling, consistent polling, remove unused CSS
Jul 9, 2026
7a7abd6
Merge pull request #129 from germanf/feature/alert-ui
germanf Jul 10, 2026
f0124a1
5.3.b — Prometheus metrics endpoint at /metrics with health_check gauge
Jul 10, 2026
7568ebb
Merge pull request #130 from germanf/feature/prometheus-metrics
germanf Jul 10, 2026
cc46e89
5.4.c — Health Timeline: degraded/unavailable lines, summary bar
Jul 10, 2026
35201ea
Merge pull request #131 from germanf/feature/health-timeline
germanf Jul 11, 2026
4333d4e
5.3.d — Backup Integrity Verification: PRAGMA integrity_check on all …
Jul 11, 2026
590c0f1
Merge pull request #132 from germanf/feature/backup-integrity
germanf Oct 28, 2026
c2555db
Merge branch 'main' into dev
germanf Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
5.4.b — Alert UI in Dashboard: Active Alerts widget with polling + ac…
…knowledge
  • Loading branch information
KyoX
KyoX committed Jul 9, 2026
commit 06efd2410a61adb3a5b1537dcbef1ba4ea82777a
3 changes: 3 additions & 0 deletions dashboard/frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
.alert-err {
@apply bg-[#3d1f1f] border border-danger text-danger;
}
.alert-warn {
@apply bg-[#3d2e0c] border border-warning text-warning;
}

.tabs {
@apply flex gap-1 mb-5 border-b border-border;
Expand Down
95 changes: 95 additions & 0 deletions dashboard/frontend/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ interface JobSummary {
created_at: string;
}

interface AlertItem {
id: string;
component: string;
severity: string;
message: string;
details: Record<string, unknown> | null;
created_at: string;
acknowledged: boolean;
acknowledged_by: string | null;
}

export default function Dashboard() {
const [health, setHealth] = useState<Record<string, any> | null>(null);
const [jobs, setJobs] = useState<JobSummary[]>([]);
const [alerts, setAlerts] = useState<AlertItem[]>([]);
const [loading, setLoading] = useState(true);

useEffect(() => {
Expand All @@ -30,6 +42,20 @@ export default function Dashboard() {
.finally(() => setLoading(false));
}, []);

useEffect(() => {
fetch("/api/alerts?limit=20")
.then(r => r.ok ? r.json() : [])
.then(a => setAlerts(Array.isArray(a) ? a : []))
.catch(() => {});
const t = setInterval(() => {
fetch("/api/alerts?limit=20")
.then(r => r.ok ? r.json() : [])
.then(a => setAlerts(Array.isArray(a) ? a : []))
.catch(() => {});
}, 15000);
return () => clearInterval(t);
}, []);

if (loading) return <><SkeletonCard lines={2} /><SkeletonCard lines={3} /></>;

return (
Expand All @@ -39,6 +65,7 @@ export default function Dashboard() {
<StatusWidget />
<QuickActions />
</div>
<ActiveAlerts alerts={alerts} setAlerts={setAlerts} />
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
<TokenChart />
<JobTimeline />
Expand Down Expand Up @@ -118,6 +145,74 @@ function QuickActions() {
);
}

function ActiveAlerts({ alerts, setAlerts }: { alerts: AlertItem[]; setAlerts: (a: AlertItem[]) => void }) {
const unacked = alerts.filter(a => !a.acknowledged);

const severityDot = (s: string) => {
switch (s) {
case "critical": return "bg-danger";
case "warning": return "bg-warning";
default: return "bg-accent";
}
};

const ackOne = async (id: string) => {
await fetch(`/api/alerts/${id}/acknowledge`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
setAlerts(alerts.map(a => a.id === id ? { ...a, acknowledged: true, acknowledged_by: "ui" } : a));
};

const ackAll = async () => {
await fetch("/api/alerts/acknowledge-all", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ by: "ui" }),
});
setAlerts(alerts.map(a => ({ ...a, acknowledged: true, acknowledged_by: "ui" })));
};

return (
<div className="card">
<div className="flex items-center justify-between mb-3">
<div className="card-title m-0">Active Alerts</div>
{unacked.length > 0 && (
<button className="btn-ghost text-xs" onClick={ackAll}>Acknowledge all ({unacked.length})</button>
)}
</div>
{alerts.length === 0 ? (
<div className="text-xs text-text-muted italic">No alerts</div>
) : (
<div className="space-y-1.5 max-h-60 overflow-y-auto">
{alerts.slice(0, 20).map(a => (
<div key={a.id} className={`flex items-center justify-between px-3 py-2 rounded-md text-xs ${a.acknowledged ? "opacity-40" : "bg-surface2"}`}>
<div className="flex items-center gap-2 min-w-0 flex-1">
<span className={`w-2 h-2 rounded-full shrink-0 ${severityDot(a.severity)}`} />
<span className="font-medium truncate">{a.component}</span>
<span className="text-text-muted truncate">{a.message}</span>
<span className="text-text-muted shrink-0">{new Date(a.created_at).toLocaleTimeString()}</span>
</div>
<div className="flex items-center gap-2 shrink-0 ml-2">
{a.severity === "critical" && !a.acknowledged && (
<span className="text-danger font-semibold text-[10px] uppercase">Critical</span>
)}
{!a.acknowledged && (
<button className="btn-ghost text-[11px] px-2 py-0.5" onClick={() => ackOne(a.id)}>Ack</button>
)}
{a.acknowledged && (
<span className="text-text-muted text-[10px]">by {a.acknowledged_by}</span>
)}
</div>
</div>
))}
</div>
)}
</div>
);
}

function RecentJobs({ jobs }: { jobs: JobSummary[] }) {
const badgeClass = (s: string) => {
switch (s) {
Expand Down