mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 00:02:33 +08:00
18 lines
479 B
TypeScript
18 lines
479 B
TypeScript
import { DataSourceVariableModel, QueryVariableModel, VariableRefresh } from '@grafana/data';
|
|
|
|
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: string) {
|
|
this.variable.regex = regex;
|
|
return this;
|
|
}
|
|
}
|