Configuration

The Grid widget configuration schema is defined in src/index.ts.

Fields

Field

Type

Default

Description

title

string

""

Optional widget title shown above the grid.

useLiveData

boolean

true

Use subscription stream updates. If false, polling is used.

useEnumLabels

boolean

true

Controls displayed values (enum label vs numeric/raw value).

showUnits

boolean

false

Appends engineering units in hover values when available.

attributes

Array<{ endpoint, attribute }>

predefined 16 subarray health states

Main Tango attributes shown as squares, each with an optional Tango DB selector.

hoverAttributes

Array<{ endpoint, attribute } | Array<{ endpoint, attribute }>>

predefined hover attribute paths

Per-square hover sources. One entry per attributes row; each entry can contain one or more endpoint-aware full attribute paths.

cellLabelFormat

string

"value"

Text format rendered inside each square.

selectedVariableKey

string or select

""

Dashboard variable key to update when a square is clicked. Uses select options when host variable list is available.

selectedVariableFormat

string

"fullname"

Value/template used to compute the selected variable on square click. Supports the same tokens as cellLabelFormat.

workspace

string or select

"" or first available

Workspace ID/key to switch to when a square is clicked. Uses select options when host workspace list is available.

cellFontSizePx

number

unset

Fixed font size inside square labels. When unset, auto-fit is used.

squareGapPx

number

2

Spacing between squares in pixels (>= 0).

squareSizePx

number[]

[0,0]

Optional fixed square size as [width,height] pixels. [] or [0,0] keeps automatic sizing.

hoverAttributes behavior

  • hoverAttributes[idx] maps to attributes[idx].

  • Each hover entry must be a full attribute path, for example sys/test/aux/temp.

  • When attributes[idx] and hoverAttributes[idx] use [properties]... and expansions have matching sizes, hover values are mapped by index per square.

  • If hoverAttributes[idx] contains multiple [properties]... selectors and each one expands to the same size as attributes[idx], each square receives one value from each selector (for example two hover rows: state + status).

  • If hoverAttributes is empty (or a row has no hover targets), no hover card is shown for that row.

Example (two hover properties per card):

{
  "attributes": [
    {
      "endpoint": "http://octopus-tangogql-ariadne-secondary:5004/db",
      "attribute": "[properties]mid-cbf/control/0/subarrays/healthstate"
    }
  ],
  "hoverAttributes": [
    [
      {
        "endpoint": "http://octopus-tangogql-ariadne-secondary:5004/db",
        "attribute": "[properties]mid-cbf/control/0/subarrays/state"
      },
      {
        "endpoint": "http://octopus-tangogql-ariadne-secondary:5004/db",
        "attribute": "[properties]mid-cbf/control/0/subarray/status"
      }
    ]
  ]
}

With 8 expanded healthstate rows, and both hover selectors also expanding to 8 rows, each card shows 2 hover chips: one state and one status.

[properties] attribute selector

attributes and hoverAttributes also support a property-expansion selector format:

  • [properties]<controller-device>/<property-name>/<attribute>

  • Example: [properties]mid-cbf/control/0/FSPUnits/healthstate

Behavior:

  • The widget queries device(endpoint, name) for <controller-device>.

  • It reads <property-name> from the returned properties.

  • Every device name in that property value is expanded to <device-name>/<attribute>.

  • One configured selector can therefore render many grid squares.

  • Hover sources are expanded with the same rule.

cellLabelFormat tokens

Supported direct values:

  • value

  • attribute

  • fullname

  • lastname

  • device

  • split(n) where n is a zero-based path segment index

Template form is also supported, for example:

  • attr-{lastname}

  • {split(0)}/{attribute}

selectedVariableFormat tokens

selectedVariableFormat supports the same direct values and template tokens as cellLabelFormat.

Examples:

  • fullname

  • device

  • {device}/{attribute}

  • subarray-{split(2)}

Notes:

  • selectedVariableKey must match an existing dashboard variable key (case-sensitive). If the host does not know that key, updates can be ignored.

Workspace options behavior

  • The widget registers immediately with a manual workspace string field.

  • If host workspace preferences are available, the widget re-registers schema with workspace as a select and discovered options.

Variable options behavior

  • The widget registers immediately with a manual selectedVariableKey string field.

  • If host variables are available in runtime state, the widget re-registers schema with selectedVariableKey as a select.