awa-ui 0.3.0

Web UI and JSON API for the Awa job queue
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
/** Colour-coded lag display: green <10s, amber 10-60s, red >60s */
export function LagValue({ seconds }: { seconds: number | null }) {
  if (seconds == null) return <span className="text-muted-fg">-</span>;

  const color =
    seconds < 10
      ? "text-success"
      : seconds < 60
        ? "text-warning"
        : "text-danger";

  return <span className={color}>{seconds.toFixed(1)}</span>;
}