mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 10:02:33 +08:00

* Variables: Fixes issue with upgrading legacy queries * Tests: adds tests for upgradeLegacyQueries
20 lines
539 B
TypeScript
20 lines
539 B
TypeScript
import { QueryVariableModel } from 'app/features/variables/types';
|
|
import { DatasourceVariableBuilder } from './datasourceVariableBuilder';
|
|
|
|
export class QueryVariableBuilder<T extends QueryVariableModel> extends DatasourceVariableBuilder<T> {
|
|
withTags(useTags: boolean) {
|
|
this.variable.useTags = useTags;
|
|
return this;
|
|
}
|
|
|
|
withTagsQuery(tagsQuery: string) {
|
|
this.variable.tagsQuery = tagsQuery;
|
|
return this;
|
|
}
|
|
|
|
withDatasource(datasource: string) {
|
|
this.variable.datasource = datasource;
|
|
return this;
|
|
}
|
|
}
|