mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 09:05:45 -06:00
* wip * make diff easier to read * Update template_srv getVariables to return new TypedVariableModel * update VariableType to use the type from TypedVariableModel * tidy things up
18 lines
490 B
TypeScript
18 lines
490 B
TypeScript
import { DataSourceVariableModel, QueryVariableModel, VariableRefresh } from 'app/features/variables/types';
|
|
|
|
import { MultiVariableBuilder } from './multiVariableBuilder';
|
|
|
|
export class DatasourceVariableBuilder<
|
|
T extends DataSourceVariableModel | QueryVariableModel
|
|
> extends MultiVariableBuilder<T> {
|
|
withRefresh(refresh: VariableRefresh) {
|
|
this.variable.refresh = refresh;
|
|
return this;
|
|
}
|
|
|
|
withRegEx(regex: any) {
|
|
this.variable.regex = regex;
|
|
return this;
|
|
}
|
|
}
|