forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
488 B
15 lines
488 B
import { DataSourceRef } from '@grafana/data';
|
|
import { AdHocVariableFilter, AdHocVariableModel } from 'app/features/variables/types';
|
|
import { VariableBuilder } from './variableBuilder';
|
|
|
|
export class AdHocVariableBuilder extends VariableBuilder<AdHocVariableModel> {
|
|
withDatasource(datasource: DataSourceRef) {
|
|
this.variable.datasource = datasource;
|
|
return this;
|
|
}
|
|
|
|
withFilters(filters: AdHocVariableFilter[]) {
|
|
this.variable.filters = filters;
|
|
return this;
|
|
}
|
|
}
|
|
|