unrip/src/operator-dashboard/static/components/ServiceCard.jsx
philipp 0b7e5e2e6c
All checks were successful
deploy / deploy (push) Successful in 26s
Implement runtime health sentinel and angry dashboard
Proof: Runtime health sentinel, alert routing, and anomaly detection for stale/disconnected quote truth, truthful dashboard severity, webhook notifications, and safe executor containment.

Assumptions: Existing control APIs remain the service-local truth surface; external notification stays as a generic webhook sink; executor disarm is an allowed non-fund-moving containment action; current dashboard/operator files in the worktree belong to this turn and are intended to ship together.

Still fake: No live external receiver is configured; webhook delivery is implemented but unverified end-to-end in production; cluster rollout still depends on deploying the new image; no automatic deployment restart path was added.
2026-04-08 19:35:07 +02:00

23 lines
974 B
JavaScript

import Pill from './Pill.jsx';
import { formatAge, formatBoolean } from '../lib/format.js';
export default function ServiceCard({ service }) {
const healthLabel = service.health_status || (service.health_ok ? 'healthy' : service.reachable ? 'degraded' : 'offline');
return (
<div className="service-card">
<div className="service-head">
<strong>{service.label}</strong>
<Pill label={healthLabel} stateLabel={healthLabel} />
</div>
<div className="service-detail">
<div>{`Paused ${formatBoolean(service.paused)}`}</div>
<div>{`Armed ${formatBoolean(service.armed)}`}</div>
<div>{`Freshness ${formatAge(service.freshness_age_ms)}`}</div>
{service.health_reasons?.length ? <div>{service.health_reasons.join(' | ')}</div> : null}
<div className="mono">{service.base_url}</div>
{service.last_error ? <div>{JSON.stringify(service.last_error)}</div> : null}
</div>
</div>
);
}