import { Link } from "react-router-dom"; import { useConsecutiveFailures } from "../api/hooks.js"; import { formatTime } from "../lib/format.jsx"; export function FailuresPage() { const { data, isLoading, error } = useConsecutiveFailures(); const items = data?.items ?? []; return (
Workflows that have failed 4 or more times in a row for the same trigger.
{isLoading ? ( ) : error ? (Failed to load consecutive failures
) : items.length === 0 ? (None
) : (| Streak | Workflow | Trigger | Last error | Last failed |
|---|---|---|---|---|
| {s.consecutiveFailures} | {s.workflow_name || s.workflow} | {s.trigger_type} {s.trigger_detail ? ` · ${s.trigger_detail}` : ""} | {s.lastRun.error || "—"} | {formatTime(s.lastRun.started_at)} |