mirror of
https://github.com/grafana/grafana.git
synced 2025-01-06 22:23:19 -06:00
683ce69347
* ContextMenuPlugin WIP * Remove Add annotations menu item from graph context menu * ts ifx * WIP * Tests updates * ts check fix * Fix rebase * Use replace function in angular graph data links
13 lines
494 B
TypeScript
13 lines
494 B
TypeScript
import { TimeRange } from '@grafana/data';
|
|
import { convertToStoreState } from './convertToStoreState';
|
|
import { TemplateSrv } from '../../app/features/templating/template_srv';
|
|
import { getTemplateSrvDependencies } from './getTemplateSrvDependencies';
|
|
|
|
export function initTemplateSrv(variables: any[], timeRange?: TimeRange) {
|
|
const state = convertToStoreState(variables);
|
|
const srv = new TemplateSrv(getTemplateSrvDependencies(state));
|
|
srv.init(variables, timeRange);
|
|
|
|
return srv;
|
|
}
|