This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/runtimegetTemplateSrv

getTemplateSrv variable

getTemplateSrv variable

Used to retrieve the TemplateSrv that can be used to fetch available template variables.

Signature

getTemplateSrv: () => TemplateSrv

Import

import { getTemplateSrv } from '@grafana/runtime';