grafana/public/app/plugins/datasource/testdata/constants.ts
Alex Khomenko 3225b119d4
Migration: TestData Query Editor (#27997)
* Use new editor

* Add basic fields

* Add labels

* Add ids

* Add ManualEntryEditor

* Use tooltip prop

* Switch to inline labels

* Fix inline label tooltip position

* Allow resetting max-width

* Replace form inputs

* Add random walk editor

* separate editors

* Add logs and endpoints fields

* Add PredictablePulseEditor

* Add CSVWaveEditor

* Add grow prop

* Add default query

* Fix types

* Fix manual editor

* Fix type issues

* Handle scenario change

* Sort scenarios by label

* Add ManualEditor test

* Fix label height

* test manual editor

* Update test

* Setup QueryEditor tests

* Fix selected value

* Connect CSVWaveEditor

* Convert stream data to numbers

* Fix random walk editor

* Cleanup

* Convert scenarios to ts

* Remove extra icon styles

* Minor tweaks

* Update e2e tests

* Remove useEffect

* Add missing aria-labels

* Use new button components
2020-10-14 13:08:35 +03:00

28 lines
540 B
TypeScript

import { defaultQuery as defaultStreamQuery } from './runStreams';
import { TestDataQuery } from './types';
export const defaultPulse: any = {
timeStep: 60,
onCount: 3,
onValue: 2,
offCount: 3,
offValue: 1,
};
export const defaultCSVWave: any = {
timeStep: 60,
valuesCSV: '0,0,2,2,1,1',
};
export const defaultQuery: TestDataQuery = {
points: [],
stream: defaultStreamQuery,
pulseWave: defaultPulse,
csvWave: defaultCSVWave,
stringInput: '',
scenarioId: 'random_walk',
lines: 10,
refId: '',
alias: '',
};