mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* test apply * test apply * Move standard field config editor registry to grafana-data * merge master * Apply field config defaults * Make field and dataFrameIndex optional on on FieldOverrideContext * Apply custom field config overrides * Gauge - make sure thresholds are set * Move series and field scoped vars calculation * Enable template variables interpolation in title fields * Expose standars field configs from grafana ui via function * Add missing option to the config for the min value to be derived from field values * Fix ts issue Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
23 lines
579 B
TypeScript
23 lines
579 B
TypeScript
import { FieldConfig, standardFieldConfigEditorRegistry } from '@grafana/data';
|
|
|
|
describe('standardFieldConfigEditorRegistry', () => {
|
|
const dummyConfig: FieldConfig = {
|
|
title: 'Hello',
|
|
min: 10,
|
|
max: 10,
|
|
decimals: 10,
|
|
thresholds: {} as any,
|
|
noValue: 'no value',
|
|
unit: 'km/s',
|
|
links: {} as any,
|
|
};
|
|
|
|
it('make sure all fields have a valid name', () => {
|
|
standardFieldConfigEditorRegistry.list().forEach(v => {
|
|
if (!dummyConfig.hasOwnProperty(v.id)) {
|
|
fail(`Registry uses unknown property: ${v.id}`);
|
|
}
|
|
});
|
|
});
|
|
});
|