Runs: a run can now be deleted (DELETE /runs/{id}, cancelling a live one
first), exported as csv from the screen's own filters, and its flow label
opens the flow. Its "Parameters" panel became "Inputs" and lists every
input the flow declares, marking the ones that took the flow's own value
rather than the run's — the comparison table resolves the same defaults
instead of printing "unset".
Home reads brain, dashboards, health, flows: the mosaic is one full-width
scrolling strip, and the flows list and the flow-activity rollups merged
into a single left-joined table so a flow's state and its numbers sit on
one row.
Charts take a drag to narrow the x window and a double click or tap to
come back out. UplotChart holds the scale and passes resetScales:false
while a window is held, which is what the old comment said made this
impossible.
31 lines
1012 B
TypeScript
31 lines
1012 B
TypeScript
import type { HistoryPoint } from "@/client"
|
|
import { Sparkline } from "@/components/Common/Sparkline"
|
|
|
|
/**
|
|
* A flow's execution trend, drawn from the 60 slices the rollup carries.
|
|
*
|
|
* Sixty slices of whatever window is selected, so the curve stays the same
|
|
* width and only its resolution moves. The same curve the node panel and the
|
|
* edge popover draw, dot included, in the chart ramp this page's other graphs
|
|
* use. The dot marks the newest slice rather than this instant: the server
|
|
* holds the slice that is still filling back, so the curve ends on one that is
|
|
* all there.
|
|
*/
|
|
export function Spark({ counts }: { counts: number[] }) {
|
|
const points: HistoryPoint[] = counts.map((value, index) => ({
|
|
ts: index,
|
|
value,
|
|
}))
|
|
if (points.every((point) => point.value === 0)) {
|
|
return <span className="text-xs text-muted-foreground">nothing yet</span>
|
|
}
|
|
return (
|
|
<Sparkline
|
|
points={points}
|
|
color="var(--chart-1)"
|
|
height="h-6"
|
|
readout={false}
|
|
/>
|
|
)
|
|
}
|