Pin a chart to the last few runs of a flow
This commit is contained in:
@@ -118,6 +118,20 @@ export function widgetIssue(widget: WidgetDef): string | null {
|
||||
if (widget.type === "markdown" || widget.type === "clock") return null
|
||||
const cfg = config(widget)
|
||||
|
||||
if (widget.type === "chart" && cfg.source === "runs") {
|
||||
const runs = (cfg.runs ?? {}) as {
|
||||
metric?: string
|
||||
flow?: string
|
||||
group?: string
|
||||
ids?: string[]
|
||||
}
|
||||
if (!runs.metric) return "This chart names no run metric yet."
|
||||
if (!runs.ids?.length && !runs.group && !runs.flow) {
|
||||
return "Say which runs: a flow, a sweep, or run ids."
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
if (widget.type === "chart" && cfg.source === "query") {
|
||||
if (!text(cfg.request)) return "This chart does not ask for anything yet."
|
||||
if (!text(cfg.message)) return "This chart has no answer to draw yet."
|
||||
|
||||
Reference in New Issue
Block a user