Skip to main content

Metric widget

The metric widget renders a single headline number — active orders, occupancy, open tickets. It is the fastest way to give a dashboard a pulse.

Widget kinds

Widgets come from a closed catalogue; unknown types are rejected at publish and render as a graceful placeholder at runtime.

KindPurposeReference
metricSingle headline numberthis page
tableRow dataTable
chartBar / line seriesChart
markdownStatic narrativeMarkdown
formStructured inputForm
timelineTime-ordered activityTimeline
kanbanColumn-grouped cardssee Pages
calendarDay-grouped entriessee Pages
statusBadge per rowsee Pages
mapLocation listsee Pages
activityActivity feedsee Pages

Definition

ui/widgets.yaml (excerpt)
- id: active_orders
type: metric
title: Active orders
source: runtime_metrics
options:
value_path: executions.active
label: currently running workflows
suffix: ""
FieldTypeRequiredDescription
idstringYesWidget id referenced by page placements.
typestringYesmetric.
titlestringYesCard header.
sourcestringYesSource id from sources.yaml.
options.value_pathstringYesDot path into the source payload, e.g. executions.active.
options.labelstringNoCaption under the number.
options.suffixstringNoUnit rendered after the number (%, , …).

Data flow

  • The fetch fires only if the installation was granted the source's capability (runtime.query for runtime sources, connector.invoke for connector sources). See Sources.
  • value_path navigates nested payloads: executions.active reads payload.executions.active. A missing path renders an em-dash, never an error card.

Restaurant Pro usage

Dashboard placement — a compact span-3 card beside the revenue chart:

ui/pages.yaml (excerpt)
- id: dashboard
layout: dashboard-grid
widgets:
- { widget: active_orders, span: 3 }

Guidelines

  • One number per metric; pair related numbers as separate placements.
  • Use suffix for units instead of embedding them in label.
  • Prefer runtime sources for platform counts and connector sources for business counts — do not duplicate one through the other.