variables.ts 496 B

123456789101112131415
  1. import { StandardVariableQuery, StandardVariableSupport } from '@grafana/data';
  2. import { TestDataDataSource } from './datasource';
  3. import { TestDataQuery } from './types';
  4. export class TestDataVariableSupport extends StandardVariableSupport<TestDataDataSource> {
  5. toDataQuery(query: StandardVariableQuery): TestDataQuery {
  6. return {
  7. refId: 'TestDataDataSource-QueryVariable',
  8. stringInput: query.query,
  9. scenarioId: 'variables-query',
  10. csvWave: undefined,
  11. };
  12. }
  13. }