mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 18:02:15 +08:00

* schematize data query * add the stuff you dingus * feat(testdatasource): add scenario to generated types * use generated testdata query in frontend * update code owners * Add path exception for testdata datasource * use specific numeric data types * fix test * fix e2e smoketest * add test data query type * use test data query type * fix betterer * Fix typo * move to experimental Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> Co-authored-by: sam boyer <sdboyer@grafana.com> Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
16 lines
528 B
TypeScript
16 lines
528 B
TypeScript
import { StandardVariableQuery, StandardVariableSupport } from '@grafana/data';
|
|
|
|
import { TestData, TestDataQueryType } from './dataquery.gen';
|
|
import { TestDataDataSource } from './datasource';
|
|
|
|
export class TestDataVariableSupport extends StandardVariableSupport<TestDataDataSource> {
|
|
toDataQuery(query: StandardVariableQuery): TestData {
|
|
return {
|
|
refId: 'TestDataDataSource-QueryVariable',
|
|
stringInput: query.query,
|
|
scenarioId: TestDataQueryType.VariablesQuery,
|
|
csvWave: undefined,
|
|
};
|
|
}
|
|
}
|