Skip to content

DatasourceVariableBuilder🔗

Constructor🔗

new DatasourceVariableBuilder(name: string)

Methods🔗

build🔗

Builds the object.

build()

allValue🔗

Custom all value

allValue(allValue: string)

current🔗

Shows current selected variable text/value on the dashboard

current(current: dashboard.VariableOption)

description🔗

Description of variable. It can be defined but null.

description(description: string)

hide🔗

Visibility configuration for the variable

hide(hide: dashboard.VariableHide)

includeAll🔗

Whether all value option is available or not

includeAll(includeAll: boolean)

label🔗

Optional display name

label(label: string)

multi🔗

Whether multiple values can be selected or not from variable value list

multi(multi: boolean)

name🔗

Name of variable

name(name: string)

regex🔗

Optional field, if you want to extract part of a series name or metric node segment.

Named capture groups can be used to separate the display text and value.

regex(regex: string)

type🔗

Query used to fetch values for a variable

type(query: string | Record<string, any>)

See also🔗