Skip to main content

Dashboards

A dashboard is a saved grid of panels that visualize the results of Hamelin queries over a Space's datasets. Its resource ID is prefixed DSH_.

A dashboard holds an ordered list of panels laid out on a 24-column grid. Each visualization panel carries one or more Hamelin queries and a Vega-Lite or table spec that renders the results. Panels run their queries against the datasets in the dashboard's Space, and fromDatasets names those datasets. Template variables let a panel query reference ${variable} placeholders that a reader picks values for at view time. A dashboard is content.

Panels​

A panel is one entry in the panels array. The type field discriminates four kinds. Every panel carries an id and a layout. Every kind except title carries an optional title.

FieldTypeRequiredDescription
idstringRequiredUnique panel identifier within the dashboard.
typeenumRequiredPanel kind: vega-lite, table, markdown, or title. Determines which other fields apply.
layoutobjectRequiredGrid placement. See Panel layout.
titleobjectOptionalPanel heading. See Panel title. Omitted from title-type panels, which supply their own required title.

Fields by panel type:

Panel typeFieldTypeRequiredDescription
vega-litequerystringRequiredSingle Hamelin query. Kept for backward compatibility with single-query panels.
vega-litequeriesarray<PanelQuery>OptionalMultiple named queries. Each has id (the Vega dataset key), name (the tab label), and query.
vega-litespecobjectRequiredThe Vega-Lite specification, as an object. Validated at render time.
vega-litetimeRangestringOptionalPanel time range. Empty inherits the dashboard's defaultTimeRange.
tablequerystringRequiredHamelin query whose result rows fill the table.
tabletimeRangestringOptionalPanel time range. Empty inherits the dashboard's defaultTimeRange.
markdowncontentstringOptionalMarkdown or rich-text body.
titletitleobjectRequiredSection header. Same shape as Panel title but size defaults to md.
titlecollapsedbooleanOptionalWhether the panels grouped under this title are hidden in the rendered grid.

Panel layout​

Placement on the 24-column grid. All values are integers.

FieldTypeRequiredDescription
xintegerRequiredColumn of the panel's left edge.
yintegerRequiredRow of the panel's top edge.
wintegerRequiredWidth in columns.
hintegerRequiredHeight in rows.

Panel title​

FieldTypeRequiredDescription
textstringRequiredThe heading text.
alignenumOptionalHorizontal alignment: left, center, or right. Default left.
sizeenumOptionalText size: sm, md, or lg. Default sm for content panels, md for title panels.

Template variables​

A template variable is one entry in templateVariables. A panel query references it as ${name}, and a reader selects a value from the variable's values list. The kind field discriminates two kinds. A primitive variable substitutes a typed literal. An identifier_fragment variable substitutes an identifier segment, so its values are restricted to letters, digits, and underscores.

FieldTypeRequiredDescription
idstringRequiredUnique variable identifier within the dashboard.
namestringRequiredThe name referenced as ${name}. Starts with a letter or underscore, then letters, digits, and underscores. Cannot be a reserved name (__proto__, constructor, prototype, hasOwnProperty, toString, valueOf). Unique within the dashboard.
kindenumRequiredprimitive or identifier_fragment.
typeenumRequired for primitiveThe literal type: int, double, boolean, string, or interval. Every value must parse as this type. An interval value is a positive integer and a unit, such as 1h, 15min, or 7d.
valuesarray<string>RequiredThe selectable values. For identifier_fragment, each value contains only letters, digits, and underscores.
defaultValuestringRequiredThe value selected by default. Must appear in values.
descriptionstringOptionalFree-text description of the variable.

Export file​

A dashboard, or a single panel, can be exported to a JSON file and imported into another dashboard. The file is a versioned envelope. The kind field discriminates the two shapes.

FieldTypeRequiredDescription
versionintegerRequiredExport schema version. Currently 1.
kindenumRequireddashboard for a whole dashboard, panel for a single panel.
dashboardobjectRequired for dashboardThe dashboard body: name, panels, templateVariables, refreshInterval, and defaultTimeRange.
panelobjectRequired for panelA single Panel object.
metadataobjectOptionalProvenance recorded at export, such as dashboardId, organizationId, folderPath, and exportedAt. Ignored on import.

Inputs​

FieldTypeRequiredDescription
namestringRequiredDashboard name. Unique within its Space and folder.
panelsarray<Panel>RequiredThe panels rendered on the grid, in order. See Panels.
templateVariablesarray<TemplateVariable>OptionalNamed variables that panel queries reference as ${name}. Names must be unique within the dashboard. See Template variables.
refreshIntervalenumOptionalAuto-refresh cadence in milliseconds: 0 (no auto-refresh), 900000 (15 minutes), or 3600000 (1 hour). Default 0.
defaultTimeRangestringOptionalDashboard-wide time range applied to panels that do not set their own. A Hamelin range expression such as -1h or -24h..now(). Default -1h.
folderPathstringOptionalFolder location within the Space, e.g. Dashboards/AWS.
spaceIdstringRequired on createThe Space the dashboard belongs to, prefixed SPC_. Immutable after creation.

Outputs​

FieldTypeDescription
folderIdstringThe containing folder, prefixed FLD_. Null when the dashboard sits at the Space root.
fromDatasetsarray<object>The datasets this dashboard's panels query. Each entry has name, resourceName, resourceId, and spaceId.

Plus the common resource fields.

  • Spaces, the container whose datasets a dashboard's panels query.
  • Content, where a dashboard sits among Perpetual's resources.
  • Changesets, how edits to a dashboard are staged and committed.
  • Folders, how dashboards are organized within a Space.
  • Visualize query results, how to build a panel from a query.