Skip to content

LibrarypanelLibraryPanelModelBuilderπŸ”—

ConstructorπŸ”—

func NewLibrarypanelLibraryPanelModelBuilder() *LibrarypanelLibraryPanelModelBuilder

MethodsπŸ”—

BuildπŸ”—

Builds the object.

func (builder *LibrarypanelLibraryPanelModelBuilder) Build() (LibrarypanelLibraryPanelModel, error)

CacheTimeoutπŸ”—

Sets panel queries cache timeout.

func (builder *LibrarypanelLibraryPanelModelBuilder) CacheTimeout(cacheTimeout string) *LibrarypanelLibraryPanelModelBuilder

DatasourceπŸ”—

The datasource used in all targets.

func (builder *LibrarypanelLibraryPanelModelBuilder) Datasource(datasource dashboard.DataSourceRef) *LibrarypanelLibraryPanelModelBuilder

DescriptionπŸ”—

Panel description.

func (builder *LibrarypanelLibraryPanelModelBuilder) Description(description string) *LibrarypanelLibraryPanelModelBuilder

FieldConfigπŸ”—

Field options allow you to change how the data is displayed in your visualizations.

func (builder *LibrarypanelLibraryPanelModelBuilder) FieldConfig(fieldConfig dashboard.FieldConfigSource) *LibrarypanelLibraryPanelModelBuilder

HideTimeOverrideπŸ”—

Controls if the timeFrom or timeShift overrides are shown in the panel header

func (builder *LibrarypanelLibraryPanelModelBuilder) HideTimeOverride(hideTimeOverride bool) *LibrarypanelLibraryPanelModelBuilder

IntervalπŸ”—

The min time interval setting defines a lower limit for the $__interval and $__interval_ms variables.

This value must be formatted as a number followed by a valid time

identifier like: "40s", "3d", etc.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

func (builder *LibrarypanelLibraryPanelModelBuilder) Interval(interval string) *LibrarypanelLibraryPanelModelBuilder

Panel links.

func (builder *LibrarypanelLibraryPanelModelBuilder) Links(links []cog.Builder[dashboard.DashboardLink]) *LibrarypanelLibraryPanelModelBuilder

MaxDataPointsπŸ”—

The maximum number of data points that the panel queries are retrieving.

func (builder *LibrarypanelLibraryPanelModelBuilder) MaxDataPoints(maxDataPoints float64) *LibrarypanelLibraryPanelModelBuilder

MaxPerRowπŸ”—

Option for repeated panels that controls max items per row

Only relevant for horizontally repeated panels

func (builder *LibrarypanelLibraryPanelModelBuilder) MaxPerRow(maxPerRow float64) *LibrarypanelLibraryPanelModelBuilder

OptionsπŸ”—

It depends on the panel plugin. They are specified by the Options field in panel plugin schemas.

func (builder *LibrarypanelLibraryPanelModelBuilder) Options(options any) *LibrarypanelLibraryPanelModelBuilder

PluginVersionπŸ”—

The version of the plugin that is used for this panel. This is used to find the plugin to display the panel and to migrate old panel configs.

func (builder *LibrarypanelLibraryPanelModelBuilder) PluginVersion(pluginVersion string) *LibrarypanelLibraryPanelModelBuilder

QueryCachingTTLπŸ”—

Overrides the data source configured time-to-live for a query cache item in milliseconds

func (builder *LibrarypanelLibraryPanelModelBuilder) QueryCachingTTL(queryCachingTTL float64) *LibrarypanelLibraryPanelModelBuilder

RepeatπŸ”—

Name of template variable to repeat for.

func (builder *LibrarypanelLibraryPanelModelBuilder) Repeat(repeat string) *LibrarypanelLibraryPanelModelBuilder

RepeatDirectionπŸ”—

Direction to repeat in if 'repeat' is set.

h for horizontal, v for vertical.

func (builder *LibrarypanelLibraryPanelModelBuilder) RepeatDirection(repeatDirection librarypanel.LibraryPanelRepeatDirection) *LibrarypanelLibraryPanelModelBuilder

TargetsπŸ”—

Depends on the panel plugin. See the plugin documentation for details.

func (builder *LibrarypanelLibraryPanelModelBuilder) Targets(targets []cog.Builder[cog/variants.Dataquery]) *LibrarypanelLibraryPanelModelBuilder

TimeFromπŸ”—

Overrides the relative time range for individual panels,

which causes them to be different than what is selected in

the dashboard time picker in the top-right corner of the dashboard. You can use this to show metrics from different

time periods or days on the same dashboard.

The value is formatted as time operation like: now-5m (Last 5 minutes), now/d (the day so far),

now-5d/d(Last 5 days), now/w (This week so far), now-2y/y (Last 2 years).

Note: Panel time overrides have no effect when the dashboard’s time range is absolute.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

func (builder *LibrarypanelLibraryPanelModelBuilder) TimeFrom(timeFrom string) *LibrarypanelLibraryPanelModelBuilder

TimeShiftπŸ”—

Overrides the time range for individual panels by shifting its start and end relative to the time picker.

For example, you can shift the time range for the panel to be two hours earlier than the dashboard time picker setting 2h.

Note: Panel time overrides have no effect when the dashboard’s time range is absolute.

See: https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/#query-options

func (builder *LibrarypanelLibraryPanelModelBuilder) TimeShift(timeShift string) *LibrarypanelLibraryPanelModelBuilder

TitleπŸ”—

Panel title.

func (builder *LibrarypanelLibraryPanelModelBuilder) Title(title string) *LibrarypanelLibraryPanelModelBuilder

TransformationsπŸ”—

List of transformations that are applied to the panel data before rendering.

When there are multiple transformations, Grafana applies them in the order they are listed.

Each transformation creates a result set that then passes on to the next transformation in the processing pipeline.

func (builder *LibrarypanelLibraryPanelModelBuilder) Transformations(transformations []dashboard.DataTransformerConfig) *LibrarypanelLibraryPanelModelBuilder

TransparentπŸ”—

Whether to display the panel without a background.

func (builder *LibrarypanelLibraryPanelModelBuilder) Transparent(transparent bool) *LibrarypanelLibraryPanelModelBuilder

TypeπŸ”—

The panel plugin type id. This is used to find the plugin to display the panel.

func (builder *LibrarypanelLibraryPanelModelBuilder) Type(typeArg string) *LibrarypanelLibraryPanelModelBuilder

See alsoπŸ”—