mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana/data: Remove barrel files part 2 (#89850)
* chore(grafana-data): remove datetime barrel file and update all imports * chore(grafana-data): remove types barrel file and update imports * chore(grafana-data): update types imports across package files * chore(grafana-data): fix erroronous type export definition on OrgRole * chore(grafana-data): fix errornous re-export type declarations and missing datetime/common exports * chore(azure-monitor): fix import pointing to nested grafana-data barrel file
This commit is contained in:
parent
c538d7ca6f
commit
306ae8b4f5
@ -1,6 +1,6 @@
|
||||
import { PropsWithChildren, ReactElement, useMemo } from 'react';
|
||||
|
||||
import { DataSourceInstanceSettings } from '../../types';
|
||||
import { DataSourceInstanceSettings } from '../../types/datasource';
|
||||
|
||||
import { Context, DataSourcePluginContextType } from './PluginContext';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DataFrame } from '../types';
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
|
||||
import { ArrayDataFrame, arrayToDataFrame } from './ArrayDataFrame';
|
||||
import { toDataFrameDTO } from './processDataFrame';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { QueryResultMeta } from '../types';
|
||||
import { QueryResultMeta } from '../types/data';
|
||||
import { Field, FieldType, DataFrame, TIME_SERIES_VALUE_FIELD_NAME } from '../types/dataFrame';
|
||||
|
||||
import { guessFieldTypeForField } from './processDataFrame';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { DataFrame, FieldType, FieldConfig, Labels, QueryResultMeta, Field } from '../types';
|
||||
import { Labels, QueryResultMeta } from '../types/data';
|
||||
import { FieldType, DataFrame, Field, FieldConfig } from '../types/dataFrame';
|
||||
|
||||
import { guessFieldTypeFromNameAndValue } from './processDataFrame';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { DisplayProcessor } from '../types';
|
||||
import { DataFrame, Field } from '../types/dataFrame';
|
||||
import { DisplayProcessor } from '../types/displayValue';
|
||||
import { FunctionalVector } from '../vector/FunctionalVector';
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { getFieldDisplayName } from '../field/fieldState';
|
||||
import { reduceField, ReducerID } from '../transformations/fieldReducer';
|
||||
import { FieldType, DataFrame } from '../types';
|
||||
import { FieldType, DataFrame } from '../types/dataFrame';
|
||||
|
||||
import { DataFrameJSON } from './DataFrameJSON';
|
||||
import {
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { AlignedData } from 'uplot';
|
||||
|
||||
import { join } from '../transformations/transformers/joinDataFrames';
|
||||
import { FieldDTO, QueryResultMeta, DataFrame, Field, FieldType, Labels } from '../types';
|
||||
import { Labels, QueryResultMeta } from '../types/data';
|
||||
import { FieldDTO, DataFrame, Field, FieldType } from '../types/dataFrame';
|
||||
import { parseLabels } from '../utils/labels';
|
||||
import { renderLegendFormat } from '../utils/legend';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { dateTime } from '../datetime/moment_wrapper';
|
||||
import { DataFrameDTO, Field, FieldType, TableData, TimeSeries } from '../types/index';
|
||||
import { TimeSeries, TableData } from '../types/data';
|
||||
import { FieldType, DataFrameDTO, Field } from '../types/dataFrame';
|
||||
|
||||
import { ArrayDataFrame } from './ArrayDataFrame';
|
||||
import {
|
||||
|
@ -1,30 +1,24 @@
|
||||
// Libraries
|
||||
import { isArray, isBoolean, isNumber, isString } from 'lodash';
|
||||
|
||||
// Types
|
||||
import { isDateTime } from '../datetime/moment_wrapper';
|
||||
import { fieldIndexComparer } from '../field/fieldComparers';
|
||||
import { getFieldDisplayName } from '../field/fieldState';
|
||||
import { Column, LoadingState, TableData, TimeSeries, TimeSeriesValue } from '../types/data';
|
||||
import {
|
||||
DataFrame,
|
||||
Field,
|
||||
FieldConfig,
|
||||
TimeSeries,
|
||||
FieldType,
|
||||
TableData,
|
||||
Column,
|
||||
GraphSeriesXY,
|
||||
TimeSeriesValue,
|
||||
FieldDTO,
|
||||
DataFrameDTO,
|
||||
TIME_SERIES_VALUE_FIELD_NAME,
|
||||
TIME_SERIES_TIME_FIELD_NAME,
|
||||
DataQueryResponseData,
|
||||
PanelData,
|
||||
LoadingState,
|
||||
GraphSeriesValue,
|
||||
TIME_SERIES_VALUE_FIELD_NAME,
|
||||
Field,
|
||||
DataFrameWithValue,
|
||||
} from '../types/index';
|
||||
DataFrameDTO,
|
||||
FieldDTO,
|
||||
FieldConfig,
|
||||
} from '../types/dataFrame';
|
||||
import { DataQueryResponseData } from '../types/datasource';
|
||||
import { GraphSeriesXY, GraphSeriesValue } from '../types/graph';
|
||||
import { PanelData } from '../types/panel';
|
||||
|
||||
import { arrayToDataFrame } from './ArrayDataFrame';
|
||||
import { dataFrameFromJSON } from './DataFrameJSON';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FieldType } from '../types';
|
||||
import { FieldType } from '../types/dataFrame';
|
||||
|
||||
import { createDataFrame, toDataFrame } from './processDataFrame';
|
||||
import { anySeriesWithTimeField, addRow } from './utils';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { includes, isDate } from 'lodash';
|
||||
|
||||
import { TimeZone } from '../types/index';
|
||||
import { TimeZone } from '../types/time';
|
||||
|
||||
import { DateTime, dateTime, dateTimeForTimeZone, DurationUnit, isDateTime, ISO_8601 } from './moment_wrapper';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable id-blacklist, no-restricted-imports, @typescript-eslint/ban-types */
|
||||
import moment, { Moment } from 'moment-timezone';
|
||||
|
||||
import { TimeZone } from '../types';
|
||||
import { TimeZone } from '../types/time';
|
||||
|
||||
import { DateTimeOptions, getTimeZone } from './common';
|
||||
import { systemDateFormats } from './formats';
|
||||
|
@ -1,11 +0,0 @@
|
||||
// Names are too general to export globally
|
||||
import * as dateMath from './datemath';
|
||||
import * as rangeUtil from './rangeutil';
|
||||
export * from './moment_wrapper';
|
||||
export * from './timezones';
|
||||
export * from './formats';
|
||||
export * from './formatter';
|
||||
export * from './parser';
|
||||
export * from './durationutil';
|
||||
export { dateMath, rangeUtil };
|
||||
export { type DateTimeOptions, setTimeZoneResolver, type TimeZoneResolver, getTimeZone } from './common';
|
@ -1,8 +1,14 @@
|
||||
import { RawTimeRange, TimeRange } from '../types/time';
|
||||
|
||||
import { timeRangeToRelative } from './rangeutil';
|
||||
|
||||
import { dateTime, rangeUtil } from './index';
|
||||
import { dateTime } from './moment_wrapper';
|
||||
import {
|
||||
convertRawToRange,
|
||||
describeInterval,
|
||||
isRelativeTimeRange,
|
||||
relativeToTimeRange,
|
||||
roundInterval,
|
||||
timeRangeToRelative,
|
||||
} from './rangeutil';
|
||||
|
||||
describe('Range Utils', () => {
|
||||
// These tests probably wrap the dateTimeParser tests to some extent
|
||||
@ -15,7 +21,7 @@ describe('Range Utils', () => {
|
||||
};
|
||||
|
||||
it('should serialize the default format by default', () => {
|
||||
const deserialized = rangeUtil.convertRawToRange(defaultRawTimeRange);
|
||||
const deserialized = convertRawToRange(defaultRawTimeRange);
|
||||
expect(deserialized.from.format()).toBe(DEFAULT_DATE_VALUE_FORMATTED);
|
||||
});
|
||||
|
||||
@ -26,17 +32,12 @@ describe('Range Utils', () => {
|
||||
to: '30-07-1996 16:20:00',
|
||||
};
|
||||
|
||||
const deserializedTimeRange = rangeUtil.convertRawToRange(
|
||||
nonDefaultRawTimeRange,
|
||||
undefined,
|
||||
undefined,
|
||||
NON_DEFAULT_FORMAT
|
||||
);
|
||||
const deserializedTimeRange = convertRawToRange(nonDefaultRawTimeRange, undefined, undefined, NON_DEFAULT_FORMAT);
|
||||
expect(deserializedTimeRange.from.format()).toBe(DEFAULT_DATE_VALUE_FORMATTED);
|
||||
});
|
||||
|
||||
it('should take timezone into account', () => {
|
||||
const deserializedTimeRange = rangeUtil.convertRawToRange(defaultRawTimeRange, 'UTC');
|
||||
const deserializedTimeRange = convertRawToRange(defaultRawTimeRange, 'UTC');
|
||||
expect(deserializedTimeRange.from.format()).toBe('1996-07-30T16:00:00Z');
|
||||
});
|
||||
|
||||
@ -46,7 +47,7 @@ describe('Range Utils', () => {
|
||||
to: 'now',
|
||||
};
|
||||
|
||||
const deserialized = rangeUtil.convertRawToRange(timeRange);
|
||||
const deserialized = convertRawToRange(timeRange);
|
||||
expect(deserialized.raw).toStrictEqual(timeRange);
|
||||
expect(deserialized.to.toString()).not.toBe(deserialized.raw.to);
|
||||
});
|
||||
@ -55,13 +56,13 @@ describe('Range Utils', () => {
|
||||
describe('relative time', () => {
|
||||
it('should identify absolute vs relative', () => {
|
||||
expect(
|
||||
rangeUtil.isRelativeTimeRange({
|
||||
isRelativeTimeRange({
|
||||
from: '1234',
|
||||
to: '4567',
|
||||
})
|
||||
).toBe(false);
|
||||
expect(
|
||||
rangeUtil.isRelativeTimeRange({
|
||||
isRelativeTimeRange({
|
||||
from: 'now-5',
|
||||
to: 'now',
|
||||
})
|
||||
@ -71,7 +72,7 @@ describe('Range Utils', () => {
|
||||
|
||||
describe('describe_interval', () => {
|
||||
it('falls back to seconds if input is a number', () => {
|
||||
expect(rangeUtil.describeInterval('123')).toEqual({
|
||||
expect(describeInterval('123')).toEqual({
|
||||
sec: 1,
|
||||
type: 's',
|
||||
count: 123,
|
||||
@ -79,7 +80,7 @@ describe('Range Utils', () => {
|
||||
});
|
||||
|
||||
it('parses a valid time unt string correctly', () => {
|
||||
expect(rangeUtil.describeInterval('123h')).toEqual({
|
||||
expect(describeInterval('123h')).toEqual({
|
||||
sec: 3600,
|
||||
type: 'h',
|
||||
count: 123,
|
||||
@ -87,12 +88,12 @@ describe('Range Utils', () => {
|
||||
});
|
||||
|
||||
it('fails if input is invalid', () => {
|
||||
expect(() => rangeUtil.describeInterval('123xyz')).toThrow();
|
||||
expect(() => rangeUtil.describeInterval('xyz')).toThrow();
|
||||
expect(() => describeInterval('123xyz')).toThrow();
|
||||
expect(() => describeInterval('xyz')).toThrow();
|
||||
});
|
||||
|
||||
it('should be able to parse negative values as well', () => {
|
||||
expect(rangeUtil.describeInterval('-50ms')).toEqual({
|
||||
expect(describeInterval('-50ms')).toEqual({
|
||||
sec: 0.001,
|
||||
type: 'ms',
|
||||
count: -50,
|
||||
@ -102,130 +103,130 @@ describe('Range Utils', () => {
|
||||
|
||||
describe('roundInterval', () => {
|
||||
it('rounds 9ms to 1ms', () => {
|
||||
expect(rangeUtil.roundInterval(9)).toEqual(1);
|
||||
expect(roundInterval(9)).toEqual(1);
|
||||
});
|
||||
|
||||
it('rounds 14ms to 10ms', () => {
|
||||
expect(rangeUtil.roundInterval(9)).toEqual(1);
|
||||
expect(roundInterval(9)).toEqual(1);
|
||||
});
|
||||
|
||||
it('rounds 34ms to 20ms', () => {
|
||||
expect(rangeUtil.roundInterval(34)).toEqual(20);
|
||||
expect(roundInterval(34)).toEqual(20);
|
||||
});
|
||||
|
||||
it('rounds 74ms to 50ms', () => {
|
||||
expect(rangeUtil.roundInterval(74)).toEqual(50);
|
||||
expect(roundInterval(74)).toEqual(50);
|
||||
});
|
||||
|
||||
it('rounds 149ms to 100ms', () => {
|
||||
expect(rangeUtil.roundInterval(149)).toEqual(100);
|
||||
expect(roundInterval(149)).toEqual(100);
|
||||
});
|
||||
|
||||
it('rounds 349ms to 200ms', () => {
|
||||
expect(rangeUtil.roundInterval(349)).toEqual(200);
|
||||
expect(roundInterval(349)).toEqual(200);
|
||||
});
|
||||
|
||||
it('rounds 749ms to 500ms', () => {
|
||||
expect(rangeUtil.roundInterval(749)).toEqual(500);
|
||||
expect(roundInterval(749)).toEqual(500);
|
||||
});
|
||||
|
||||
it('rounds 1.5s to 1s', () => {
|
||||
expect(rangeUtil.roundInterval(1499)).toEqual(1000);
|
||||
expect(roundInterval(1499)).toEqual(1000);
|
||||
});
|
||||
|
||||
it('rounds 3.5s to 2s', () => {
|
||||
expect(rangeUtil.roundInterval(3499)).toEqual(2000);
|
||||
expect(roundInterval(3499)).toEqual(2000);
|
||||
});
|
||||
|
||||
it('rounds 7.5s to 5s', () => {
|
||||
expect(rangeUtil.roundInterval(7499)).toEqual(5000);
|
||||
expect(roundInterval(7499)).toEqual(5000);
|
||||
});
|
||||
|
||||
it('rounds 12.5s to 10s', () => {
|
||||
expect(rangeUtil.roundInterval(12499)).toEqual(10000);
|
||||
expect(roundInterval(12499)).toEqual(10000);
|
||||
});
|
||||
|
||||
it('rounds 17.5s to 15s', () => {
|
||||
expect(rangeUtil.roundInterval(17499)).toEqual(15000);
|
||||
expect(roundInterval(17499)).toEqual(15000);
|
||||
});
|
||||
|
||||
it('rounds 25s to 20s', () => {
|
||||
expect(rangeUtil.roundInterval(24999)).toEqual(20000);
|
||||
expect(roundInterval(24999)).toEqual(20000);
|
||||
});
|
||||
|
||||
it('rounds 45s to 30s', () => {
|
||||
expect(rangeUtil.roundInterval(44999)).toEqual(30000);
|
||||
expect(roundInterval(44999)).toEqual(30000);
|
||||
});
|
||||
|
||||
it('rounds 1m30s to 1m', () => {
|
||||
expect(rangeUtil.roundInterval(89999)).toEqual(60000);
|
||||
expect(roundInterval(89999)).toEqual(60000);
|
||||
});
|
||||
|
||||
it('rounds 3m30s to 2m', () => {
|
||||
expect(rangeUtil.roundInterval(209999)).toEqual(120000);
|
||||
expect(roundInterval(209999)).toEqual(120000);
|
||||
});
|
||||
|
||||
it('rounds 7m30s to 5m', () => {
|
||||
expect(rangeUtil.roundInterval(449999)).toEqual(300000);
|
||||
expect(roundInterval(449999)).toEqual(300000);
|
||||
});
|
||||
|
||||
it('rounds 12m30s to 10m', () => {
|
||||
expect(rangeUtil.roundInterval(749999)).toEqual(600000);
|
||||
expect(roundInterval(749999)).toEqual(600000);
|
||||
});
|
||||
|
||||
it('rounds 17m30s to 15m', () => {
|
||||
expect(rangeUtil.roundInterval(1049999)).toEqual(900000);
|
||||
expect(roundInterval(1049999)).toEqual(900000);
|
||||
});
|
||||
|
||||
it('rounds 25m to 20m', () => {
|
||||
expect(rangeUtil.roundInterval(1499999)).toEqual(1200000);
|
||||
expect(roundInterval(1499999)).toEqual(1200000);
|
||||
});
|
||||
|
||||
it('rounds 45m to 30m', () => {
|
||||
expect(rangeUtil.roundInterval(2699999)).toEqual(1800000);
|
||||
expect(roundInterval(2699999)).toEqual(1800000);
|
||||
});
|
||||
|
||||
it('rounds 1h30m to 1h', () => {
|
||||
expect(rangeUtil.roundInterval(5399999)).toEqual(3600000);
|
||||
expect(roundInterval(5399999)).toEqual(3600000);
|
||||
});
|
||||
|
||||
it('rounds 2h30m to 2h', () => {
|
||||
expect(rangeUtil.roundInterval(8999999)).toEqual(7200000);
|
||||
expect(roundInterval(8999999)).toEqual(7200000);
|
||||
});
|
||||
|
||||
it('rounds 4h30m to 3h', () => {
|
||||
expect(rangeUtil.roundInterval(16199999)).toEqual(10800000);
|
||||
expect(roundInterval(16199999)).toEqual(10800000);
|
||||
});
|
||||
|
||||
it('rounds 9h to 6h', () => {
|
||||
expect(rangeUtil.roundInterval(32399999)).toEqual(21600000);
|
||||
expect(roundInterval(32399999)).toEqual(21600000);
|
||||
});
|
||||
|
||||
it('rounds 1d to 12h', () => {
|
||||
expect(rangeUtil.roundInterval(86399999)).toEqual(43200000);
|
||||
expect(roundInterval(86399999)).toEqual(43200000);
|
||||
});
|
||||
|
||||
it('rounds 1w to 1d', () => {
|
||||
expect(rangeUtil.roundInterval(604799999)).toEqual(86400000);
|
||||
expect(roundInterval(604799999)).toEqual(86400000);
|
||||
});
|
||||
|
||||
it('rounds 3w to 1w', () => {
|
||||
expect(rangeUtil.roundInterval(1814399999)).toEqual(604800000);
|
||||
expect(roundInterval(1814399999)).toEqual(604800000);
|
||||
});
|
||||
|
||||
it('rounds 6w to 30d', () => {
|
||||
expect(rangeUtil.roundInterval(3628799999)).toEqual(2592000000);
|
||||
expect(roundInterval(3628799999)).toEqual(2592000000);
|
||||
});
|
||||
|
||||
it('rounds >6w to 1y', () => {
|
||||
expect(rangeUtil.roundInterval(3628800000)).toEqual(31536000000);
|
||||
expect(roundInterval(3628800000)).toEqual(31536000000);
|
||||
});
|
||||
});
|
||||
|
||||
describe('relativeToTimeRange', () => {
|
||||
it('should convert seconds to timeRange', () => {
|
||||
const relativeTimeRange = { from: 600, to: 300 };
|
||||
const timeRange = rangeUtil.relativeToTimeRange(relativeTimeRange, dateTime('2021-04-20T15:55:00Z'));
|
||||
const timeRange = relativeToTimeRange(relativeTimeRange, dateTime('2021-04-20T15:55:00Z'));
|
||||
|
||||
expect(timeRange.from.valueOf()).toEqual(dateTime('2021-04-20T15:45:00Z').valueOf());
|
||||
expect(timeRange.to.valueOf()).toEqual(dateTime('2021-04-20T15:50:00Z').valueOf());
|
||||
@ -233,7 +234,7 @@ describe('Range Utils', () => {
|
||||
|
||||
it('should convert from now', () => {
|
||||
const relativeTimeRange = { from: 600, to: 0 };
|
||||
const timeRange = rangeUtil.relativeToTimeRange(relativeTimeRange, dateTime('2021-04-20T15:55:00Z'));
|
||||
const timeRange = relativeToTimeRange(relativeTimeRange, dateTime('2021-04-20T15:55:00Z'));
|
||||
|
||||
expect(timeRange.from.valueOf()).toEqual(dateTime('2021-04-20T15:45:00Z').valueOf());
|
||||
expect(timeRange.to.valueOf()).toEqual(dateTime('2021-04-20T15:55:00Z').valueOf());
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { memoize } from 'lodash';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import { TimeZone } from '../types';
|
||||
import { TimeZone } from '../types/time';
|
||||
|
||||
import { getTimeZone } from './common';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { AnnotationEvent, DataFrame } from '../types';
|
||||
import { AnnotationEvent } from '../types/annotations';
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
|
||||
import { BusEventBase, BusEventWithPayload } from './types';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { systemDateFormats } from '../datetime';
|
||||
import { systemDateFormats } from '../datetime/formats';
|
||||
import { createTheme } from '../themes';
|
||||
import { FieldConfig, FieldType, ThresholdsMode } from '../types';
|
||||
import { FieldConfig, FieldType } from '../types/dataFrame';
|
||||
import { DisplayProcessor, DisplayValue } from '../types/displayValue';
|
||||
import { ThresholdsMode } from '../types/thresholds';
|
||||
import { MappingType, ValueMapping } from '../types/valueMapping';
|
||||
|
||||
import { getDisplayProcessor, getRawDisplayProcessor } from './displayProcessor';
|
||||
|
@ -3,11 +3,13 @@ import { toString, toNumber as _toNumber, isEmpty, isBoolean, isArray, join } fr
|
||||
|
||||
// Types
|
||||
import { getFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
import { toUtc, dateTimeParse } from '../datetime';
|
||||
import { toUtc } from '../datetime/moment_wrapper';
|
||||
import { dateTimeParse } from '../datetime/parser';
|
||||
import { GrafanaTheme2 } from '../themes/types';
|
||||
import { KeyValue, TimeZone } from '../types';
|
||||
import { KeyValue } from '../types/data';
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
import { DecimalCount, DisplayProcessor, DisplayValue } from '../types/displayValue';
|
||||
import { TimeZone } from '../types/time';
|
||||
import { anyToNumber } from '../utils/anyToNumber';
|
||||
import { getValueMappingResult } from '../utils/valueMappings';
|
||||
import { FormattedValue, getValueFormat, isBooleanUnit } from '../valueFormats/valueFormats';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { createTheme } from '../themes';
|
||||
import { Field, FieldColorModeId, FieldType } from '../types';
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
import { FieldColorModeId } from '../types/fieldColor';
|
||||
|
||||
import { fieldColorModeRegistry, FieldValueColorCalculator, getFieldSeriesColor } from './fieldColor';
|
||||
|
||||
|
@ -5,7 +5,9 @@ import tinycolor from 'tinycolor2';
|
||||
import { colorManipulator } from '../themes';
|
||||
import { GrafanaTheme2 } from '../themes/types';
|
||||
import { reduceField } from '../transformations/fieldReducer';
|
||||
import { FALLBACK_COLOR, Field, FieldColorModeId, Threshold } from '../types';
|
||||
import { Field } from '../types/dataFrame';
|
||||
import { FALLBACK_COLOR, FieldColorModeId } from '../types/fieldColor';
|
||||
import { Threshold } from '../types/thresholds';
|
||||
import { Registry, RegistryItem } from '../utils/Registry';
|
||||
|
||||
import { getScaleCalculator, ColorScaleValue } from './scale';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { isNumber } from 'lodash';
|
||||
|
||||
import { dateTime, isDateTimeInput } from '../datetime';
|
||||
import { isDateTimeInput, dateTime } from '../datetime/moment_wrapper';
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
|
||||
type IndexComparer = (a: number, b: number) => number;
|
||||
|
@ -3,7 +3,8 @@ import { merge } from 'lodash';
|
||||
import { toDataFrame } from '../dataframe/processDataFrame';
|
||||
import { createTheme } from '../themes';
|
||||
import { ReducerID } from '../transformations/fieldReducer';
|
||||
import { FieldConfigPropertyItem, MappingType, SpecialValueMatch, ValueMapping } from '../types';
|
||||
import { FieldConfigPropertyItem } from '../types/fieldOverrides';
|
||||
import { MappingType, SpecialValueMatch, ValueMapping } from '../types/valueMapping';
|
||||
|
||||
import { getDisplayProcessor } from './displayProcessor';
|
||||
import { fixCellTemplateExpressions, getFieldDisplayValues, GetFieldDisplayValuesOptions } from './fieldDisplay';
|
||||
|
@ -6,20 +6,13 @@ import { GrafanaTheme2 } from '../themes';
|
||||
import { reduceField, ReducerID } from '../transformations/fieldReducer';
|
||||
import { getFieldMatcher } from '../transformations/matchers';
|
||||
import { FieldMatcherID } from '../transformations/matchers/ids';
|
||||
import {
|
||||
DataFrame,
|
||||
DisplayValue,
|
||||
DisplayValueAlignmentFactors,
|
||||
Field,
|
||||
FieldConfig,
|
||||
FieldConfigSource,
|
||||
FieldType,
|
||||
InterpolateFunction,
|
||||
LinkModel,
|
||||
TimeRange,
|
||||
TimeZone,
|
||||
} from '../types';
|
||||
import { ScopedVars } from '../types/ScopedVars';
|
||||
import { DataFrame, Field, FieldConfig, FieldType } from '../types/dataFrame';
|
||||
import { LinkModel } from '../types/dataLink';
|
||||
import { DisplayValue, DisplayValueAlignmentFactors } from '../types/displayValue';
|
||||
import { FieldConfigSource } from '../types/fieldOverrides';
|
||||
import { InterpolateFunction } from '../types/panel';
|
||||
import { TimeRange, TimeZone } from '../types/time';
|
||||
|
||||
import { getDisplayProcessor } from './displayProcessor';
|
||||
import { getFieldDisplayName } from './fieldState';
|
||||
|
@ -1,21 +1,15 @@
|
||||
import { ArrayDataFrame } from '../dataframe/ArrayDataFrame';
|
||||
import { createDataFrame, toDataFrame } from '../dataframe/processDataFrame';
|
||||
import { rangeUtil } from '../datetime';
|
||||
import { relativeToTimeRange } from '../datetime/rangeutil';
|
||||
import { createTheme } from '../themes';
|
||||
import { FieldMatcherID } from '../transformations/matchers/ids';
|
||||
import {
|
||||
DataFrame,
|
||||
Field,
|
||||
FieldColorModeId,
|
||||
FieldConfig,
|
||||
FieldConfigPropertyItem,
|
||||
FieldConfigSource,
|
||||
FieldType,
|
||||
GrafanaConfig,
|
||||
InterpolateFunction,
|
||||
ScopedVars,
|
||||
ThresholdsMode,
|
||||
} from '../types';
|
||||
import { ScopedVars } from '../types/ScopedVars';
|
||||
import { GrafanaConfig } from '../types/config';
|
||||
import { FieldType, DataFrame, Field, FieldConfig } from '../types/dataFrame';
|
||||
import { FieldColorModeId } from '../types/fieldColor';
|
||||
import { FieldConfigPropertyItem, FieldConfigSource } from '../types/fieldOverrides';
|
||||
import { InterpolateFunction } from '../types/panel';
|
||||
import { ThresholdsMode } from '../types/thresholds';
|
||||
import { Registry } from '../utils/Registry';
|
||||
import { locationUtil } from '../utils/location';
|
||||
import { mockStandardProperties } from '../utils/tests/mockStandardProperties';
|
||||
@ -912,7 +906,7 @@ describe('getLinksSupplier', () => {
|
||||
});
|
||||
|
||||
const datasourceUid = '1234';
|
||||
const range = rangeUtil.relativeToTimeRange({ from: 600, to: 0 });
|
||||
const range = relativeToTimeRange({ from: 600, to: 0 });
|
||||
const f0 = createDataFrame({
|
||||
name: 'A',
|
||||
fields: [
|
||||
|
@ -11,31 +11,21 @@ import { GrafanaTheme2 } from '../themes';
|
||||
import { asHexString } from '../themes/colorManipulator';
|
||||
import { ReducerID, reduceField } from '../transformations/fieldReducer';
|
||||
import { fieldMatchers } from '../transformations/matchers';
|
||||
import { ScopedVars, DataContextScopedVar } from '../types/ScopedVars';
|
||||
import { DataFrame, NumericRange, FieldType, Field, ValueLinkConfig, FieldConfig } from '../types/dataFrame';
|
||||
import { LinkModel, DataLink } from '../types/dataLink';
|
||||
import { DisplayProcessor, DisplayValue, DecimalCount } from '../types/displayValue';
|
||||
import { FieldColorModeId } from '../types/fieldColor';
|
||||
import {
|
||||
ApplyFieldOverrideOptions,
|
||||
DataContextScopedVar,
|
||||
DataFrame,
|
||||
DataLink,
|
||||
DecimalCount,
|
||||
DisplayProcessor,
|
||||
DisplayValue,
|
||||
DynamicConfigValue,
|
||||
Field,
|
||||
FieldColorModeId,
|
||||
FieldConfig,
|
||||
FieldConfigPropertyItem,
|
||||
FieldConfigSource,
|
||||
ApplyFieldOverrideOptions,
|
||||
FieldOverrideContext,
|
||||
FieldType,
|
||||
FieldConfigPropertyItem,
|
||||
DataLinkPostProcessor,
|
||||
InterpolateFunction,
|
||||
LinkModel,
|
||||
NumericRange,
|
||||
PanelData,
|
||||
ScopedVars,
|
||||
TimeZone,
|
||||
ValueLinkConfig,
|
||||
} from '../types';
|
||||
FieldConfigSource,
|
||||
} from '../types/fieldOverrides';
|
||||
import { InterpolateFunction, PanelData } from '../types/panel';
|
||||
import { TimeZone } from '../types/time';
|
||||
import { FieldMatcher } from '../types/transformations';
|
||||
import { mapInternalLinkToExplore } from '../utils/dataLinks';
|
||||
import { locationUtil } from '../utils/location';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { toDataFrame } from '../dataframe/processDataFrame';
|
||||
import { DataFrame, TIME_SERIES_VALUE_FIELD_NAME, FieldType, TIME_SERIES_TIME_FIELD_NAME } from '../types';
|
||||
import { DataFrame, TIME_SERIES_TIME_FIELD_NAME, FieldType, TIME_SERIES_VALUE_FIELD_NAME } from '../types/dataFrame';
|
||||
|
||||
import { getFieldDisplayName, getFrameDisplayName } from './fieldState';
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { getFieldMatcher } from '../transformations/matchers';
|
||||
import {
|
||||
DataFrame,
|
||||
Field,
|
||||
TIME_SERIES_VALUE_FIELD_NAME,
|
||||
FieldType,
|
||||
Field,
|
||||
TIME_SERIES_TIME_FIELD_NAME,
|
||||
FieldConfigSource,
|
||||
} from '../types';
|
||||
TIME_SERIES_VALUE_FIELD_NAME,
|
||||
} from '../types/dataFrame';
|
||||
import { FieldConfigSource } from '../types/fieldOverrides';
|
||||
import { formatLabels } from '../utils/labels';
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { toNumber } from 'lodash';
|
||||
|
||||
import { DataFrame, DisplayValue, TimeZone } from '../types';
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
import { DisplayValue } from '../types/displayValue';
|
||||
import { TimeZone } from '../types/time';
|
||||
import { formattedValueToString } from '../valueFormats/valueFormats';
|
||||
|
||||
import { getDisplayProcessor } from './displayProcessor';
|
||||
|
@ -1,12 +1,10 @@
|
||||
import {
|
||||
DataLink,
|
||||
Field,
|
||||
FieldOverrideContext,
|
||||
SelectableValue,
|
||||
SliderMarks,
|
||||
ThresholdsConfig,
|
||||
ValueMapping,
|
||||
} from '../../types';
|
||||
import { Field } from '../../types/dataFrame';
|
||||
import { DataLink } from '../../types/dataLink';
|
||||
import { FieldOverrideContext } from '../../types/fieldOverrides';
|
||||
import { SelectableValue } from '../../types/select';
|
||||
import { SliderMarks } from '../../types/slider';
|
||||
import { ThresholdsConfig } from '../../types/thresholds';
|
||||
import { ValueMapping } from '../../types/valueMapping';
|
||||
|
||||
export const identityOverrideProcessor = <T>(value: T) => {
|
||||
return value;
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { createTheme } from '../themes';
|
||||
import { ThresholdsMode, Field, FieldType, FieldColorModeId } from '../types';
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
import { FieldColorModeId } from '../types/fieldColor';
|
||||
import { ThresholdsMode } from '../types/thresholds';
|
||||
|
||||
import { getScaleCalculator } from './scale';
|
||||
import { sortThresholds } from './thresholds';
|
||||
|
@ -2,7 +2,8 @@ import { isNumber } from 'lodash';
|
||||
|
||||
import { GrafanaTheme2 } from '../themes/types';
|
||||
import { reduceField, ReducerID } from '../transformations/fieldReducer';
|
||||
import { Field, FieldConfig, FieldType, NumericRange, Threshold } from '../types';
|
||||
import { Field, FieldConfig, FieldType, NumericRange } from '../types/dataFrame';
|
||||
import { Threshold } from '../types/thresholds';
|
||||
|
||||
import { getFieldColorModeForField } from './fieldColor';
|
||||
import { getActiveThresholdForValue } from './thresholds';
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { ComponentType } from 'react';
|
||||
|
||||
import { EventBus } from '../events';
|
||||
import { DataFrame, InterpolateFunction, VariableSuggestionsScope, VariableSuggestion } from '../types';
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
import { VariableSuggestionsScope, VariableSuggestion } from '../types/dataLink';
|
||||
import { InterpolateFunction } from '../types/panel';
|
||||
import { Registry, RegistryItem } from '../utils/Registry';
|
||||
|
||||
import { FieldConfigOptionsRegistry } from './FieldConfigOptionsRegistry';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ThresholdsConfig, ThresholdsMode, FieldConfig, Threshold, Field, FieldType } from '../types';
|
||||
import { Field, FieldConfig, FieldType } from '../types/dataFrame';
|
||||
import { Threshold, ThresholdsConfig, ThresholdsMode } from '../types/thresholds';
|
||||
|
||||
import { validateFieldConfig } from './fieldOverrides';
|
||||
import { sortThresholds, getActiveThreshold, getActiveThresholdForValue } from './thresholds';
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { Threshold, FALLBACK_COLOR, Field, ThresholdsMode } from '../types';
|
||||
import { Field } from '../types/dataFrame';
|
||||
import { FALLBACK_COLOR } from '../types/fieldColor';
|
||||
import { Threshold, ThresholdsMode } from '../types/thresholds';
|
||||
|
||||
export const fallBackThreshold: Threshold = { value: 0, color: FALLBACK_COLOR };
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema';
|
||||
import { EventBus } from '../events';
|
||||
import { StandardEditorContext } from '../field/standardFieldConfigEditorRegistry';
|
||||
import { GrafanaTheme2 } from '../themes';
|
||||
import { PanelData } from '../types';
|
||||
import { PanelData } from '../types/panel';
|
||||
import { PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
|
||||
import { RegistryItemWithOptions } from '../utils/Registry';
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export * from './types';
|
||||
export * from './datetime';
|
||||
export * from './text';
|
||||
export * from './events';
|
||||
export * from './themes';
|
||||
@ -85,7 +83,6 @@ export {
|
||||
export { compareDataFrameStructures, compareArrayValues, shallowCompare } from './dataframe/frameComparisons';
|
||||
|
||||
// Field
|
||||
|
||||
export {
|
||||
getFieldColorModeForField,
|
||||
getFieldColorMode,
|
||||
@ -163,7 +160,6 @@ export {
|
||||
} from './field/overrides/processors';
|
||||
|
||||
// Utils
|
||||
|
||||
export { PanelOptionsEditorBuilder, FieldConfigEditorBuilder } from './utils/OptionsUIBuilders';
|
||||
export { getFlotPairs, getFlotPairsConstant } from './utils/flotPairs';
|
||||
export { locationUtil } from './utils/location';
|
||||
@ -222,7 +218,6 @@ export { store } from './utils/store';
|
||||
export { LocalStorageValueProvider } from './utils/LocalStorageValueProvider';
|
||||
|
||||
// Tranformations
|
||||
|
||||
export { standardTransformers } from './transformations/transformers';
|
||||
export {
|
||||
fieldMatchers,
|
||||
@ -273,7 +268,6 @@ export { applyNullInsertThreshold } from './transformations/transformers/nulls/n
|
||||
export { nullToValue } from './transformations/transformers/nulls/nullToValue';
|
||||
|
||||
// ValueFormats
|
||||
|
||||
export {
|
||||
type FormattedValue,
|
||||
type ValueFormatter,
|
||||
@ -295,6 +289,71 @@ export {
|
||||
getValueFormats,
|
||||
} from './valueFormats/valueFormats';
|
||||
|
||||
// datetime
|
||||
export * as dateMath from './datetime/datemath';
|
||||
export * as rangeUtil from './datetime/rangeutil';
|
||||
export { type DateTimeOptions, setTimeZoneResolver, type TimeZoneResolver, getTimeZone } from './datetime/common';
|
||||
export {
|
||||
ISO_8601,
|
||||
type DateTimeBuiltinFormat,
|
||||
type DateTimeInput,
|
||||
type FormatInput,
|
||||
type DurationInput,
|
||||
type DurationUnit,
|
||||
type DateTimeLocale,
|
||||
type DateTimeDuration,
|
||||
type DateTime,
|
||||
setLocale,
|
||||
getLocale,
|
||||
getLocaleData,
|
||||
isDateTimeInput,
|
||||
isDateTime,
|
||||
toUtc,
|
||||
toDuration,
|
||||
dateTime,
|
||||
dateTimeAsMoment,
|
||||
dateTimeForTimeZone,
|
||||
getWeekdayIndex,
|
||||
getWeekdayIndexByEnglishName,
|
||||
setWeekStart,
|
||||
} from './datetime/moment_wrapper';
|
||||
export {
|
||||
InternalTimeZones,
|
||||
timeZoneFormatUserFriendly,
|
||||
getZone,
|
||||
type TimeZoneCountry,
|
||||
type TimeZoneInfo,
|
||||
type GroupedTimeZones,
|
||||
getTimeZoneInfo,
|
||||
getTimeZones,
|
||||
getTimeZoneGroups,
|
||||
} from './datetime/timezones';
|
||||
export {
|
||||
type SystemDateFormatSettings,
|
||||
SystemDateFormatsState,
|
||||
localTimeFormat,
|
||||
systemDateFormats,
|
||||
} from './datetime/formats';
|
||||
export {
|
||||
type DateTimeOptionsWithFormat,
|
||||
dateTimeFormat,
|
||||
dateTimeFormatISO,
|
||||
dateTimeFormatTimeAgo,
|
||||
dateTimeFormatWithAbbrevation,
|
||||
timeZoneAbbrevation,
|
||||
} from './datetime/formatter';
|
||||
export { type DateTimeOptionsWhenParsing, dateTimeParse } from './datetime/parser';
|
||||
export {
|
||||
intervalToAbbreviatedDurationString,
|
||||
parseDuration,
|
||||
addDurationToDate,
|
||||
durationToMilliseconds,
|
||||
isValidDate,
|
||||
isValidDuration,
|
||||
isValidGoDuration,
|
||||
isValidGrafanaDuration,
|
||||
} from './datetime/durationutil';
|
||||
|
||||
export {
|
||||
type ValueMatcherOptions,
|
||||
type BasicValueMatcherOptions,
|
||||
@ -323,6 +382,404 @@ export { usePluginContext } from './context/plugins/usePluginContext';
|
||||
export { isDataSourcePluginContext } from './context/plugins/guards';
|
||||
export { getLinksSupplier } from './field/fieldOverrides';
|
||||
|
||||
// Types
|
||||
export { isUnsignedPluginSignature } from './types/pluginSignature';
|
||||
export type {
|
||||
CurrentUserDTO,
|
||||
AnalyticsSettings,
|
||||
BootData,
|
||||
OAuth,
|
||||
OAuthSettings,
|
||||
AuthSettings,
|
||||
GrafanaConfig,
|
||||
BuildInfo,
|
||||
LicenseInfo,
|
||||
} from './types/config';
|
||||
export { availableIconsIndex, type IconName, isIconName, toIconName } from './types/icon';
|
||||
export type { WithAccessControlMetadata } from './types/accesscontrol';
|
||||
export { AlertState, type AlertStateInfo } from './types/alerts';
|
||||
export type { CartesianCoords2D, Dimensions2D } from './types/geometry';
|
||||
export {
|
||||
VariableSupportType,
|
||||
VariableSupportBase,
|
||||
StandardVariableSupport,
|
||||
CustomVariableSupport,
|
||||
DataSourceVariableSupport,
|
||||
type StandardVariableQuery,
|
||||
} from './types/variables';
|
||||
export {
|
||||
type AlertPayload,
|
||||
type AlertErrorPayload,
|
||||
AppEvents,
|
||||
PanelEvents,
|
||||
type LegacyGraphHoverEventPayload,
|
||||
LegacyGraphHoverEvent,
|
||||
LegacyGraphHoverClearEvent,
|
||||
} from './types/legacyEvents';
|
||||
export type {
|
||||
URLRangeValue,
|
||||
URLRange,
|
||||
ExploreUrlState,
|
||||
ExplorePanelsState,
|
||||
ExploreCorrelationHelperData,
|
||||
ExploreTracePanelState,
|
||||
ExploreLogsPanelState,
|
||||
SplitOpenOptions,
|
||||
SplitOpen,
|
||||
} from './types/explore';
|
||||
export type { TraceKeyValuePair, TraceLog, TraceSpanReference, TraceSpanRow } from './types/trace';
|
||||
export type { FlotDataPoint } from './types/flot';
|
||||
export { type UserOrgDTO, OrgRole } from './types/orgs';
|
||||
export { GrafanaThemeType, type GrafanaThemeCommons, type GrafanaTheme } from './types/theme';
|
||||
export { FieldColorModeId, type FieldColor, type FieldColorSeriesByMode, FALLBACK_COLOR } from './types/fieldColor';
|
||||
export {
|
||||
VariableRefresh,
|
||||
VariableSort,
|
||||
VariableHide,
|
||||
type VariableType,
|
||||
type VariableModel,
|
||||
type TypedVariableModel,
|
||||
type AdHocVariableFilter,
|
||||
type AdHocVariableModel,
|
||||
type GroupByVariableModel,
|
||||
type VariableOption,
|
||||
type IntervalVariableModel,
|
||||
type CustomVariableModel,
|
||||
type DataSourceVariableModel,
|
||||
type QueryVariableModel,
|
||||
type TextBoxVariableModel,
|
||||
type ConstantVariableModel,
|
||||
type VariableWithMultiSupport,
|
||||
type VariableWithOptions,
|
||||
type DashboardProps,
|
||||
type DashboardVariableModel,
|
||||
type OrgProps,
|
||||
type OrgVariableModel,
|
||||
type UserProps,
|
||||
type UserVariableModel,
|
||||
type SystemVariable,
|
||||
type BaseVariableModel,
|
||||
} from './types/templateVars';
|
||||
export { type Threshold, ThresholdsMode, type ThresholdsConfig } from './types/thresholds';
|
||||
export {
|
||||
LiveChannelScope,
|
||||
LiveChannelType,
|
||||
LiveChannelConnectionState,
|
||||
LiveChannelEventType,
|
||||
type LiveChannelStatusEvent,
|
||||
type LiveChannelJoinEvent,
|
||||
type LiveChannelLeaveEvent,
|
||||
type LiveChannelMessageEvent,
|
||||
type LiveChannelEvent,
|
||||
type LiveChannelPresenceStatus,
|
||||
type LiveChannelId,
|
||||
type LiveChannelAddress,
|
||||
isLiveChannelStatusEvent,
|
||||
isLiveChannelJoinEvent,
|
||||
isLiveChannelLeaveEvent,
|
||||
isLiveChannelMessageEvent,
|
||||
parseLiveChannelAddress,
|
||||
isValidLiveChannelAddress,
|
||||
toLiveChannelId,
|
||||
} from './types/live';
|
||||
export type { SliderMarks } from './types/slider';
|
||||
export type { FeatureToggles } from './types/featureToggles.gen';
|
||||
export {
|
||||
PluginExtensionTypes,
|
||||
PluginExtensionPoints,
|
||||
type PluginExtension,
|
||||
type PluginExtensionLink,
|
||||
type PluginExtensionComponent,
|
||||
type PluginExtensionConfig,
|
||||
type PluginExtensionLinkConfig,
|
||||
type PluginExtensionComponentConfig,
|
||||
type PluginExtensionEventHelpers,
|
||||
type PluginExtensionPanelContext,
|
||||
type PluginExtensionDataSourceConfigContext,
|
||||
type PluginExtensionCommandPaletteContext,
|
||||
type PluginExtensionOpenModalOptions,
|
||||
} from './types/pluginExtensions';
|
||||
export {
|
||||
type ScopeDashboardBindingSpec,
|
||||
type ScopeDashboardBinding,
|
||||
type ScopeFilterOperator,
|
||||
type ScopeSpecFilter,
|
||||
type ScopeSpec,
|
||||
type Scope,
|
||||
type ScopeNodeNodeType,
|
||||
type ScopeNodeLinkType,
|
||||
type ScopeNodeSpec,
|
||||
type ScopeNode,
|
||||
scopeFilterOperatorMap,
|
||||
} from './types/scopes';
|
||||
export {
|
||||
PluginState,
|
||||
PluginType,
|
||||
PluginSignatureStatus,
|
||||
PluginSignatureType,
|
||||
PluginErrorCode,
|
||||
PluginIncludeType,
|
||||
GrafanaPlugin,
|
||||
type PluginError,
|
||||
type AngularMeta,
|
||||
type PluginMeta,
|
||||
type PluginDependencies,
|
||||
type PluginInclude,
|
||||
type PluginBuildInfo,
|
||||
type ScreenshotInfo,
|
||||
type PluginMetaInfo,
|
||||
type PluginConfigPageProps,
|
||||
type PluginConfigPage,
|
||||
} from './types/plugin';
|
||||
export {
|
||||
type InterpolateFunction,
|
||||
type PanelPluginMeta,
|
||||
type PanelData,
|
||||
type PanelProps,
|
||||
type PanelEditorProps,
|
||||
type PanelMigrationHandler,
|
||||
type PanelTypeChangedHandler,
|
||||
type PanelOptionEditorsRegistry,
|
||||
type PanelOptionsEditorProps,
|
||||
type PanelOptionsEditorItem,
|
||||
type PanelOptionsEditorConfig,
|
||||
type PanelMenuItem,
|
||||
type AngularPanelMenuItem,
|
||||
type PanelPluginDataSupport,
|
||||
type VisualizationSuggestion,
|
||||
type PanelDataSummary,
|
||||
type VisualizationSuggestionsSupplier,
|
||||
VizOrientation,
|
||||
VisualizationSuggestionScore,
|
||||
VisualizationSuggestionsBuilder,
|
||||
VisualizationSuggestionsListAppender,
|
||||
} from './types/panel';
|
||||
export {
|
||||
type DataSourcePluginOptionsEditorProps,
|
||||
type DataSourceQueryType,
|
||||
type DataSourceOptionsType,
|
||||
type DataSourcePluginMeta,
|
||||
type DataSourcePluginComponents,
|
||||
type DataSourceConstructor,
|
||||
type DataSourceGetTagKeysOptions,
|
||||
type DataSourceGetTagValuesOptions,
|
||||
type MetadataInspectorProps,
|
||||
type LegacyMetricFindQueryOptions,
|
||||
type QueryEditorProps,
|
||||
type QueryEditorHelpProps,
|
||||
type LegacyResponseData,
|
||||
type DataQueryResponseData,
|
||||
type DataQueryResponse,
|
||||
type TestDataSourceResponse,
|
||||
type DataQueryError,
|
||||
type DataQueryRequest,
|
||||
type DataQueryTimings,
|
||||
type QueryFix,
|
||||
type QueryFixType,
|
||||
type QueryFixAction,
|
||||
type QueryHint,
|
||||
type MetricFindValue,
|
||||
type DataSourceJsonData,
|
||||
type DataSourceSettings,
|
||||
type DataSourceInstanceSettings,
|
||||
type DataSourceSelectItem,
|
||||
type AnnotationQueryRequest,
|
||||
type HistoryItem,
|
||||
type GetTagResponse,
|
||||
DataSourcePlugin,
|
||||
DataQueryErrorType,
|
||||
ExploreMode,
|
||||
LanguageProvider,
|
||||
DataSourceApi,
|
||||
} from './types/datasource';
|
||||
export { CoreApp, type AppRootProps, type AppPluginMeta, AppPlugin, FeatureState } from './types/app';
|
||||
export { patchArrayVectorProrotypeMethods } from './types/vector';
|
||||
export {
|
||||
type DynamicConfigValue,
|
||||
type ConfigOverrideRule,
|
||||
type SystemConfigOverrideRule,
|
||||
isSystemOverrideWithRef,
|
||||
isSystemOverride,
|
||||
type FieldConfigSource,
|
||||
type FieldOverrideContext,
|
||||
type FieldConfigEditorProps,
|
||||
type FieldOverrideEditorProps,
|
||||
type FieldConfigEditorConfig,
|
||||
type FieldConfigPropertyItem,
|
||||
type DataLinkPostProcessorOptions,
|
||||
type DataLinkPostProcessor,
|
||||
type ApplyFieldOverrideOptions,
|
||||
FieldConfigProperty,
|
||||
} from './types/fieldOverrides';
|
||||
export {
|
||||
type MatcherConfig,
|
||||
type DataTransformContext,
|
||||
type TransformationApplicabilityScore,
|
||||
TransformationApplicabilityLevels,
|
||||
type DataTransformerInfo,
|
||||
type CustomTransformOperator,
|
||||
type SynchronousDataTransformerInfo,
|
||||
type DataTransformerConfig,
|
||||
type FrameMatcher,
|
||||
type FieldMatcher,
|
||||
type ValueMatcher,
|
||||
type FieldMatcherInfo,
|
||||
type FrameMatcherInfo,
|
||||
type ValueMatcherInfo,
|
||||
SpecialValue,
|
||||
} from './types/transformations';
|
||||
export type { ScopedVar, ScopedVars, DataContextScopedVar } from './types/ScopedVars';
|
||||
export type { YAxis, GraphSeriesValue, GraphSeriesXY, CreatePlotOverlay } from './types/graph';
|
||||
export type {
|
||||
DisplayProcessor,
|
||||
DisplayValue,
|
||||
DisplayValueAlignmentFactors,
|
||||
DecimalCount,
|
||||
DecimalInfo,
|
||||
} from './types/displayValue';
|
||||
export {
|
||||
MappingType,
|
||||
type ValueMappingResult,
|
||||
type ValueMap,
|
||||
type RangeMapOptions,
|
||||
type RangeMap,
|
||||
type RegexMapOptions,
|
||||
type RegexMap,
|
||||
type SpecialValueOptions,
|
||||
SpecialValueMatch,
|
||||
type SpecialValueMap,
|
||||
type ValueMapping,
|
||||
} from './types/valueMapping';
|
||||
export {
|
||||
type RawTimeRange,
|
||||
type TimeRange,
|
||||
type RelativeTimeRange,
|
||||
type AbsoluteTimeRange,
|
||||
type IntervalValues,
|
||||
type TimeOption,
|
||||
type TimeZone,
|
||||
type TimeZoneBrowser,
|
||||
type TimeZoneUtc,
|
||||
DefaultTimeZone,
|
||||
type TimeOptions,
|
||||
type TimeFragment,
|
||||
TIME_FORMAT,
|
||||
getDefaultTimeRange,
|
||||
getDefaultRelativeTimeRange,
|
||||
makeTimeRange,
|
||||
} from './types/time';
|
||||
export type { SelectableValue } from './types/select';
|
||||
export { type NavLinkDTO, type NavModelItem, type NavModel, type NavIndex, PageLayoutType } from './types/navModel';
|
||||
export { LogsDedupStrategy, LogsSortOrder } from '@grafana/schema';
|
||||
|
||||
export {
|
||||
LogLevel,
|
||||
NumericLogLevel,
|
||||
LogsMetaKind,
|
||||
type LogsMetaItem,
|
||||
type LogRowModel,
|
||||
type LogsModel,
|
||||
type LogSearchMatch,
|
||||
type LogLabelStatsModel,
|
||||
LogsDedupDescription,
|
||||
type LogRowContextOptions,
|
||||
LogRowContextQueryDirection,
|
||||
type DataSourceWithLogsContextSupport,
|
||||
hasLogsContextSupport,
|
||||
SupplementaryQueryType,
|
||||
type SupplementaryQueryOptions,
|
||||
type LogsVolumeOption,
|
||||
type LogsSampleOptions,
|
||||
LogsVolumeType,
|
||||
type LogsVolumeCustomMetaData,
|
||||
type DataSourceWithSupplementaryQueriesSupport,
|
||||
hasSupplementaryQuerySupport,
|
||||
hasLogsContextUiSupport,
|
||||
type QueryFilterOptions,
|
||||
type ToggleFilterAction,
|
||||
type DataSourceWithToggleableQueryFiltersSupport,
|
||||
type DataSourceWithQueryModificationSupport,
|
||||
hasToggleableQueryFiltersSupport,
|
||||
hasQueryModificationSupport,
|
||||
} from './types/logs';
|
||||
export {
|
||||
type AnnotationQuery,
|
||||
type AnnotationEvent,
|
||||
type AnnotationEventUIModel,
|
||||
type AnnotationEventFieldMapping,
|
||||
type AnnotationEventMappings,
|
||||
type AnnotationSupport,
|
||||
AnnotationEventFieldSource,
|
||||
} from './types/annotations';
|
||||
export {
|
||||
DataTopic,
|
||||
type DataQuery,
|
||||
type DataSourceRef,
|
||||
type AbstractQuery,
|
||||
AbstractLabelOperator,
|
||||
type AbstractLabelMatcher,
|
||||
type DataSourceWithQueryImportSupport,
|
||||
type DataSourceWithQueryExportSupport,
|
||||
hasQueryImportSupport,
|
||||
hasQueryExportSupport,
|
||||
} from './types/query';
|
||||
export { DashboardCursorSync, type PanelModel } from './types/dashboard';
|
||||
export {
|
||||
type DataLink,
|
||||
type DataLinkClickEvent,
|
||||
type DataLinkTransformationConfig,
|
||||
DataLinkConfigOrigin,
|
||||
SupportedTransformationType,
|
||||
type InternalDataLink,
|
||||
type LinkTarget,
|
||||
type LinkModel,
|
||||
type LinkModelSupplier,
|
||||
VariableOrigin,
|
||||
type VariableSuggestion,
|
||||
VariableSuggestionsScope,
|
||||
} from './types/dataLink';
|
||||
export { DataFrameType } from './types/dataFrameTypes';
|
||||
export {
|
||||
FieldType,
|
||||
type FieldConfig,
|
||||
type FieldTypeConfig,
|
||||
type EnumFieldConfig,
|
||||
type ValueLinkConfig,
|
||||
type Field,
|
||||
type FieldState,
|
||||
type NumericRange,
|
||||
type DataFrame,
|
||||
type DataFrameWithValue,
|
||||
type FieldDTO,
|
||||
type DataFrameDTO,
|
||||
type FieldCalcs,
|
||||
TIME_SERIES_VALUE_FIELD_NAME,
|
||||
TIME_SERIES_TIME_FIELD_NAME,
|
||||
TIME_SERIES_METRIC_FIELD_NAME,
|
||||
type DataFrameFieldIndex,
|
||||
} from './types/dataFrame';
|
||||
export {
|
||||
type KeyValue,
|
||||
LoadingState,
|
||||
preferredVisualizationTypes,
|
||||
type PreferredVisualisationType,
|
||||
type QueryResultMeta,
|
||||
type QueryResultMetaStat,
|
||||
type QueryResultMetaNotice,
|
||||
type QueryResultBase,
|
||||
type Labels,
|
||||
type Column,
|
||||
type TableData,
|
||||
type TimeSeriesValue,
|
||||
type TimeSeriesPoints,
|
||||
type TimeSeries,
|
||||
NullValueMode,
|
||||
type DataConfigSource,
|
||||
isTruthy,
|
||||
isObject,
|
||||
} from './types/data';
|
||||
export { GAUGE_DEFAULT_MINIMUM, GAUGE_DEFAULT_MAXIMUM, DEFAULT_SAML_NAME } from './types/constants';
|
||||
|
||||
// deprecated
|
||||
export { CircularVector } from './vector/CircularVector';
|
||||
export { vectorator } from './vector/FunctionalVector';
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
standardEditorsRegistry,
|
||||
standardFieldConfigEditorRegistry,
|
||||
} from '../field/standardFieldConfigEditorRegistry';
|
||||
import { FieldConfigProperty, FieldConfigPropertyItem } from '../types';
|
||||
import { FieldConfigProperty, FieldConfigPropertyItem } from '../types/fieldOverrides';
|
||||
import { PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
|
||||
|
||||
import { PanelPlugin } from './PanelPlugin';
|
||||
|
@ -3,18 +3,17 @@ import { ComponentClass, ComponentType } from 'react';
|
||||
|
||||
import { FieldConfigOptionsRegistry } from '../field/FieldConfigOptionsRegistry';
|
||||
import { StandardEditorContext } from '../field/standardFieldConfigEditorRegistry';
|
||||
import { FieldConfigProperty, FieldConfigSource } from '../types/fieldOverrides';
|
||||
import {
|
||||
FieldConfigProperty,
|
||||
FieldConfigSource,
|
||||
GrafanaPlugin,
|
||||
PanelPluginMeta,
|
||||
VisualizationSuggestionsSupplier,
|
||||
PanelProps,
|
||||
PanelEditorProps,
|
||||
PanelMigrationHandler,
|
||||
PanelPluginDataSupport,
|
||||
PanelPluginMeta,
|
||||
PanelProps,
|
||||
PanelTypeChangedHandler,
|
||||
VisualizationSuggestionsSupplier,
|
||||
} from '../types';
|
||||
PanelPluginDataSupport,
|
||||
} from '../types/panel';
|
||||
import { GrafanaPlugin } from '../types/plugin';
|
||||
import { FieldConfigEditorBuilder, PanelOptionsEditorBuilder } from '../utils/OptionsUIBuilders';
|
||||
import { deprecationWarning } from '../utils/deprecationWarning';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { CurrentUserDTO, WithAccessControlMetadata } from '../types';
|
||||
import { WithAccessControlMetadata } from '../types/accesscontrol';
|
||||
import { CurrentUserDTO } from '../types/config';
|
||||
|
||||
export interface CurrentUser extends Omit<CurrentUserDTO, 'lightTheme'> {}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { GrafanaTheme, GrafanaThemeCommons, GrafanaThemeType } from '../types';
|
||||
import { GrafanaTheme, GrafanaThemeCommons, GrafanaThemeType } from '../types/theme';
|
||||
|
||||
import { GrafanaTheme2 } from './types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FALLBACK_COLOR } from '../types';
|
||||
import { FALLBACK_COLOR } from '../types/fieldColor';
|
||||
|
||||
import { ThemeColors } from './createColors';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { difference } from 'lodash';
|
||||
|
||||
import { createDataFrame, guessFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
import { Field, FieldType, NullValueMode } from '../types/index';
|
||||
import { NullValueMode } from '../types/data';
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
|
||||
import { fieldReducers, ReducerID, reduceField, defaultCalcs } from './fieldReducer';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
// Libraries
|
||||
import { isNumber } from 'lodash';
|
||||
|
||||
import { NullValueMode, Field, FieldCalcs, FieldType } from '../types/index';
|
||||
import { NullValueMode } from '../types/data';
|
||||
import { Field, FieldCalcs, FieldType } from '../types/dataFrame';
|
||||
import { Registry, RegistryItem } from '../utils/Registry';
|
||||
|
||||
export enum ReducerID {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { ComparisonOperation } from '@grafana/schema';
|
||||
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldMatcher } from '../../types';
|
||||
import { DataFrame, FieldType } from '../../types/dataFrame';
|
||||
import { FieldMatcher } from '../../types/transformations';
|
||||
import { ReducerID } from '../fieldReducer';
|
||||
|
||||
import { fieldValueMatcherInfo } from './fieldValueMatcher';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataFrame } from '../../types';
|
||||
import { DataFrame, FieldType } from '../../types/dataFrame';
|
||||
import { getFieldMatcher } from '../matchers';
|
||||
|
||||
import { FieldMatcherID } from './ids';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { DataFrame, DataTransformerInfo } from '../types';
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
import { DataTransformerInfo } from '../types/transformations';
|
||||
import { Registry, RegistryItem } from '../utils/Registry';
|
||||
|
||||
export interface TransformerUIProps<T> {
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { toDataFrame } from '../dataframe/processDataFrame';
|
||||
import { CustomTransformOperator, FieldType } from '../types';
|
||||
import { FieldType } from '../types/dataFrame';
|
||||
import { CustomTransformOperator } from '../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../utils/tests/mockTransformationsRegistry';
|
||||
|
||||
import { ReducerID } from './fieldReducer';
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { MonoTypeOperatorFunction, Observable, of } from 'rxjs';
|
||||
import { map, mergeMap } from 'rxjs/operators';
|
||||
|
||||
import { DataFrame } from '../types/dataFrame';
|
||||
import {
|
||||
DataFrame,
|
||||
CustomTransformOperator,
|
||||
DataTransformContext,
|
||||
DataTransformerConfig,
|
||||
FrameMatcher,
|
||||
CustomTransformOperator,
|
||||
} from '../types';
|
||||
} from '../types/transformations';
|
||||
|
||||
import { getFrameMatchers } from './matchers';
|
||||
import { standardTransformersRegistry, TransformerRegistryItem } from './standardTransformersRegistry';
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { DataFrameView } from '../../dataframe/DataFrameView';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformContext, ScopedVars } from '../../types';
|
||||
import { ScopedVars } from '../../types/ScopedVars';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformContext } from '../../types/transformations';
|
||||
import { BinaryOperationID } from '../../utils/binaryOperators';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { UnaryOperationID } from '../../utils/unaryOperators';
|
||||
|
@ -3,7 +3,9 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { getTimeField } from '../../dataframe/processDataFrame';
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import { DataFrame, DataTransformerInfo, Field, FieldType, NullValueMode } from '../../types';
|
||||
import { NullValueMode } from '../../types/data';
|
||||
import { DataFrame, FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerInfo } from '../../types/transformations';
|
||||
import { BinaryOperationID, binaryOperators } from '../../utils/binaryOperators';
|
||||
import { UnaryOperationID, unaryOperators } from '../../utils/unaryOperators';
|
||||
import { doStandardCalcs, fieldReducers, ReducerID } from '../fieldReducer';
|
||||
|
@ -2,9 +2,9 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { TimeZone } from '@grafana/schema';
|
||||
|
||||
import { DateTimeOptionsWhenParsing, dateTimeParse } from '../../datetime';
|
||||
import { SynchronousDataTransformerInfo } from '../../types';
|
||||
import { dateTimeParse, DateTimeOptionsWhenParsing } from '../../datetime/parser';
|
||||
import { DataFrame, EnumFieldConfig, Field, FieldType } from '../../types/dataFrame';
|
||||
import { SynchronousDataTransformerInfo } from '../../types/transformations';
|
||||
import { fieldMatchers } from '../matchers';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { ScopedVars } from '../../types';
|
||||
import { ScopedVars } from '../../types/ScopedVars';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, FieldType, MatcherConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig, MatcherConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { ValueMatcherID } from '../matchers/ids';
|
||||
import { BasicValueMatcherOptions } from '../matchers/valueMatchers/types';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { DataFrame, Field, FieldType } from '../../types';
|
||||
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerInfo, FieldMatcher, TransformationApplicabilityLevels } from '../../types/transformations';
|
||||
import { fieldMatchers } from '../matchers';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
@ -3,8 +3,12 @@ import { map } from 'rxjs/operators';
|
||||
import { TimeZone } from '@grafana/schema';
|
||||
|
||||
import { cacheFieldDisplayNames } from '../../field/fieldState';
|
||||
import { DataFrame, TransformationApplicabilityLevels } from '../../types';
|
||||
import { DataTransformContext, DataTransformerInfo } from '../../types/transformations';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
import {
|
||||
DataTransformContext,
|
||||
DataTransformerInfo,
|
||||
TransformationApplicabilityLevels,
|
||||
} from '../../types/transformations';
|
||||
|
||||
import { fieldToStringField } from './convertFieldType';
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, Field, FieldType } from '../../types';
|
||||
import { FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { ReducerID } from '../fieldReducer';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
@ -2,8 +2,8 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { guessFieldTypeForField } from '../../dataframe/processDataFrame';
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import { DataFrame, Field, FieldType, TransformationApplicabilityLevels } from '../../types';
|
||||
import { DataTransformerInfo } from '../../types/transformations';
|
||||
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerInfo, TransformationApplicabilityLevels } from '../../types/transformations';
|
||||
import { reduceField, ReducerID } from '../fieldReducer';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, Field, FieldType } from '../../types';
|
||||
import { FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { ReducerID } from '../fieldReducer';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, FieldType, Field, SpecialValue } from '../../types';
|
||||
import { FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig, SpecialValue } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,14 +1,8 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import {
|
||||
DataFrame,
|
||||
DataTransformerInfo,
|
||||
Field,
|
||||
FieldType,
|
||||
SpecialValue,
|
||||
TransformationApplicabilityLevels,
|
||||
} from '../../types';
|
||||
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
|
||||
import { SpecialValue, DataTransformerInfo, TransformationApplicabilityLevels } from '../../types/transformations';
|
||||
import { fieldMatchers } from '../matchers';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
||||
|
@ -2,8 +2,9 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { getDisplayProcessor } from '../../field/displayProcessor';
|
||||
import { createTheme, GrafanaTheme2 } from '../../themes';
|
||||
import { DataFrameType, DataTransformContext, SynchronousDataTransformerInfo } from '../../types';
|
||||
import { DataFrame, Field, FieldConfig, FieldType } from '../../types/dataFrame';
|
||||
import { DataFrameType } from '../../types/dataFrameTypes';
|
||||
import { DataTransformContext, SynchronousDataTransformerInfo } from '../../types/transformations';
|
||||
import { roundDecimals } from '../../utils/numbers';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataTransformerConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { DataFrame, SynchronousDataTransformerInfo, FieldMatcher, DataTransformContext } from '../../types';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
import { DataTransformContext, FieldMatcher, SynchronousDataTransformerInfo } from '../../types/transformations';
|
||||
import { fieldMatchers } from '../matchers';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { getTimeField, sortDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataFrame, Field, FieldMatcher, FieldType, TIME_SERIES_VALUE_FIELD_NAME } from '../../types';
|
||||
import { DataFrame, Field, FieldType, TIME_SERIES_VALUE_FIELD_NAME } from '../../types/dataFrame';
|
||||
import { FieldMatcher } from '../../types/transformations';
|
||||
import { fieldMatchers } from '../matchers';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { toDataFrame, toDataFrameDTO } from '../../dataframe/processDataFrame';
|
||||
import { DataFrame, DataTransformerConfig, FieldDTO, FieldType } from '../../types';
|
||||
import { DataFrame, FieldDTO, FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import { DataFrame, Field, FieldType, SynchronousDataTransformerInfo } from '../../types';
|
||||
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
|
||||
import { SynchronousDataTransformerInfo } from '../../types/transformations';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { DataTransformerConfig } from '@grafana/data';
|
||||
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { Field, FieldType } from '../../types';
|
||||
import { FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { DataTransformerInfo } from '../../types';
|
||||
import { DataTransformerInfo } from '../../types/transformations';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
import { transformationsVariableSupport } from './utils';
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, DisplayProcessor, Field, FieldType } from '../../types';
|
||||
import { Field, FieldType } from '../../types/dataFrame';
|
||||
import { DisplayProcessor } from '../../types/displayValue';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DataFrame } from '../../types';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
import { SynchronousDataTransformerInfo } from '../../types/transformations';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createDataFrame } from '../../../dataframe/processDataFrame';
|
||||
import { FieldType } from '../../../types';
|
||||
import { FieldType } from '../../../types/dataFrame';
|
||||
|
||||
import { applyNullInsertThreshold } from './nullInsertThreshold';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DataFrame, FieldType } from '../../../types';
|
||||
import { DataFrame, FieldType } from '../../../types/dataFrame';
|
||||
|
||||
type InsertMode = (prev: number, next: number, threshold: number) => number;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { createDataFrame } from '../../../dataframe/processDataFrame';
|
||||
import { FieldType } from '../../../types';
|
||||
import { FieldType } from '../../../types/dataFrame';
|
||||
|
||||
import { applyNullInsertThreshold } from './nullInsertThreshold';
|
||||
import { nullToValue } from './nullToValue';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DataFrame, Field } from '../../../types';
|
||||
import { DataFrame, Field } from '../../../types/dataFrame';
|
||||
|
||||
export function nullToValue(frame: DataFrame) {
|
||||
return {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataTransformerConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { clone } from 'lodash';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import { DataFrame, Field } from '../../types';
|
||||
import { DataFrame, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerInfo } from '../../types/transformations';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataTransformerConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { DataFrame, DataTransformerInfo, TransformationApplicabilityLevels } from '../../types';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
import { DataTransformerInfo, TransformationApplicabilityLevels } from '../../types/transformations';
|
||||
|
||||
import { filterFieldsByNameTransformer } from './filterByName';
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { DataFrameView } from '../../dataframe/DataFrameView';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, Field, FieldType } from '../../types';
|
||||
import { Field, FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { ReducerID } from '../fieldReducer';
|
||||
import { notTimeFieldMatcher } from '../matchers/predicates';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataTransformerConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { FieldType, DataTransformerConfig } from '../../types';
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, Field, FieldType } from '../../types';
|
||||
import { FieldType, Field } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { DataTransformerConfig, Field, FieldType } from '../../types';
|
||||
import { Field, FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerConfig } from '../../types/transformations';
|
||||
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { map } from 'rxjs/operators';
|
||||
|
||||
import { sortDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { getFieldDisplayName } from '../../field/fieldState';
|
||||
import { DataFrame } from '../../types';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
import { DataTransformContext, DataTransformerInfo } from '../../types/transformations';
|
||||
|
||||
import { DataTransformerID } from './ids';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { BootData, DataFrame } from '../../types';
|
||||
import { BootData } from '../../types/config';
|
||||
import { DataFrame } from '../../types/dataFrame';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
@ -1,12 +1,14 @@
|
||||
import { SystemDateFormatSettings } from '../datetime';
|
||||
import { SystemDateFormatSettings } from '../datetime/formats';
|
||||
import { MapLayerOptions } from '../geo/layer';
|
||||
import { GrafanaTheme2 } from '../themes';
|
||||
|
||||
import { DataSourceInstanceSettings } from './datasource';
|
||||
import { FeatureToggles } from './featureToggles.gen';
|
||||
import { IconName } from './icon';
|
||||
import { NavLinkDTO } from './navModel';
|
||||
import { OrgRole } from './orgs';
|
||||
import { PanelPluginMeta } from './panel';
|
||||
|
||||
import { GrafanaTheme, IconName, NavLinkDTO, OrgRole } from '.';
|
||||
import { GrafanaTheme } from './theme';
|
||||
|
||||
/**
|
||||
* Describes the build information that will be available via the Grafana configuration.
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { DataFrameDTO, FieldConfig } from './dataFrame';
|
||||
import { DataFrameType } from './dataFrameTypes';
|
||||
import { ApplyFieldOverrideOptions } from './fieldOverrides';
|
||||
import { PanelPluginDataSupport } from './panel';
|
||||
import { DataTopic } from './query';
|
||||
import { DataTransformerConfig } from './transformations';
|
||||
|
||||
import { PanelPluginDataSupport } from '.';
|
||||
|
||||
export type KeyValue<T = any> = Record<string, T>;
|
||||
|
||||
/**
|
||||
|
@ -4,18 +4,19 @@ import { Observable } from 'rxjs';
|
||||
import { makeClassES5Compatible } from '../utils/makeClassES5Compatible';
|
||||
|
||||
import { ScopedVars } from './ScopedVars';
|
||||
import { WithAccessControlMetadata } from './accesscontrol';
|
||||
import { AnnotationEvent, AnnotationQuery, AnnotationSupport } from './annotations';
|
||||
import { CoreApp } from './app';
|
||||
import { KeyValue, LoadingState, TableData, TimeSeries } from './data';
|
||||
import { DataFrame, DataFrameDTO } from './dataFrame';
|
||||
import { PanelData } from './panel';
|
||||
import { GrafanaPlugin, PluginMeta } from './plugin';
|
||||
import { DataQuery } from './query';
|
||||
import { DataQuery, DataSourceRef } from './query';
|
||||
import { Scope } from './scopes';
|
||||
import { AdHocVariableFilter } from './templateVars';
|
||||
import { RawTimeRange, TimeRange } from './time';
|
||||
import { CustomVariableSupport, DataSourceVariableSupport, StandardVariableSupport } from './variables';
|
||||
|
||||
import { AdHocVariableFilter, DataSourceRef, Scope, WithAccessControlMetadata } from '.';
|
||||
|
||||
export interface DataSourcePluginOptionsEditorProps<
|
||||
JSONData extends DataSourceJsonData = DataSourceJsonData,
|
||||
SecureJSONData = {},
|
||||
|
@ -3,21 +3,15 @@ import { ComponentType } from 'react';
|
||||
import { FieldConfigOptionsRegistry } from '../field/FieldConfigOptionsRegistry';
|
||||
import { StandardEditorContext, StandardEditorProps } from '../field/standardFieldConfigEditorRegistry';
|
||||
import { GrafanaTheme2 } from '../themes';
|
||||
import {
|
||||
MatcherConfig,
|
||||
FieldConfig,
|
||||
Field,
|
||||
DataFrame,
|
||||
TimeZone,
|
||||
ScopedVars,
|
||||
ValueLinkConfig,
|
||||
LinkModel,
|
||||
DataLink,
|
||||
} from '../types';
|
||||
|
||||
import { OptionsEditorItem } from './OptionsUIRegistryBuilder';
|
||||
import { ScopedVars } from './ScopedVars';
|
||||
import { DataFrame, Field, FieldConfig, ValueLinkConfig } from './dataFrame';
|
||||
import { DataLink, LinkModel } from './dataLink';
|
||||
import { OptionEditorConfig } from './options';
|
||||
import { InterpolateFunction } from './panel';
|
||||
import { TimeZone } from './time';
|
||||
import { MatcherConfig } from './transformations';
|
||||
|
||||
export interface DynamicConfigValue {
|
||||
id: string;
|
||||
|
@ -1,69 +0,0 @@
|
||||
export * from './constants';
|
||||
export * from './data';
|
||||
export * from './dataFrame';
|
||||
export * from './dataFrameTypes';
|
||||
export * from './dataLink';
|
||||
export * from './dashboard';
|
||||
export * from './query';
|
||||
export * from './annotations';
|
||||
export * from './logs';
|
||||
export * from './navModel';
|
||||
export * from './select';
|
||||
export * from './time';
|
||||
export * from './thresholds';
|
||||
export * from './valueMapping';
|
||||
export * from './displayValue';
|
||||
export * from './graph';
|
||||
export * from './ScopedVars';
|
||||
export * from './transformations';
|
||||
export * from './fieldOverrides';
|
||||
export * from './vector';
|
||||
export * from './app';
|
||||
export * from './datasource';
|
||||
export * from './panel';
|
||||
export * from './plugin';
|
||||
export * from './thresholds';
|
||||
export * from './templateVars';
|
||||
export * from './fieldColor';
|
||||
export * from './theme';
|
||||
export * from './orgs';
|
||||
export * from './flot';
|
||||
export * from './trace';
|
||||
export * from './explore';
|
||||
export * from './legacyEvents';
|
||||
export * from './live';
|
||||
export * from './variables';
|
||||
export * from './geometry';
|
||||
export { isUnsignedPluginSignature } from './pluginSignature';
|
||||
export type {
|
||||
CurrentUserDTO,
|
||||
AnalyticsSettings,
|
||||
BootData,
|
||||
OAuth,
|
||||
OAuthSettings,
|
||||
AuthSettings,
|
||||
GrafanaConfig,
|
||||
BuildInfo,
|
||||
LicenseInfo,
|
||||
} from './config';
|
||||
export type { FeatureToggles } from './featureToggles.gen';
|
||||
export * from './alerts';
|
||||
export * from './slider';
|
||||
export * from './accesscontrol';
|
||||
export * from './icon';
|
||||
export {
|
||||
PluginExtensionTypes,
|
||||
PluginExtensionPoints,
|
||||
type PluginExtension,
|
||||
type PluginExtensionLink,
|
||||
type PluginExtensionComponent,
|
||||
type PluginExtensionConfig,
|
||||
type PluginExtensionLinkConfig,
|
||||
type PluginExtensionComponentConfig,
|
||||
type PluginExtensionEventHelpers,
|
||||
type PluginExtensionPanelContext,
|
||||
type PluginExtensionDataSourceConfigContext,
|
||||
type PluginExtensionCommandPaletteContext,
|
||||
type PluginExtensionOpenModalOptions,
|
||||
} from './pluginExtensions';
|
||||
export * from './scopes';
|
@ -20,8 +20,8 @@ import {
|
||||
standardEditorsRegistry,
|
||||
} from '../field/standardFieldConfigEditorRegistry';
|
||||
import { PanelOptionsSupplier } from '../panel/PanelPlugin';
|
||||
import { isObject } from '../types';
|
||||
import { OptionsEditorItem, OptionsUIRegistryBuilder } from '../types/OptionsUIRegistryBuilder';
|
||||
import { isObject } from '../types/data';
|
||||
import { FieldConfigPropertyItem, FieldConfigEditorConfig } from '../types/fieldOverrides';
|
||||
import { PanelOptionsEditorConfig, PanelOptionsEditorItem } from '../types/panel';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PluginState } from '../types';
|
||||
import { PluginState } from '../types/plugin';
|
||||
import { SelectableValue } from '../types/select';
|
||||
|
||||
export interface RegistryItem {
|
||||
|
@ -6,7 +6,7 @@ import Papa, { ParseConfig, Parser, ParseResult } from 'papaparse';
|
||||
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
|
||||
import { guessFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
import { getFieldDisplayName } from '../field/fieldState';
|
||||
import { DataFrame, Field, FieldConfig, FieldType } from '../types';
|
||||
import { DataFrame, Field, FieldConfig, FieldType } from '../types/dataFrame';
|
||||
import { formattedValueToString } from '../valueFormats/valueFormats';
|
||||
|
||||
export enum CSVHeaderStyle {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { DateTime, toUtc } from '../datetime';
|
||||
import { DataLink, FieldType, TimeRange } from '../types';
|
||||
import { DateTime, toUtc } from '../datetime/moment_wrapper';
|
||||
import { FieldType } from '../types/dataFrame';
|
||||
import { DataLink } from '../types/dataLink';
|
||||
import { TimeRange } from '../types/time';
|
||||
|
||||
import { mapInternalLinkToExplore } from './dataLinks';
|
||||
|
||||
|
@ -1,15 +1,10 @@
|
||||
import {
|
||||
DataLink,
|
||||
DataQuery,
|
||||
ExplorePanelsState,
|
||||
Field,
|
||||
InternalDataLink,
|
||||
InterpolateFunction,
|
||||
LinkModel,
|
||||
ScopedVars,
|
||||
SplitOpen,
|
||||
TimeRange,
|
||||
} from '../types';
|
||||
import { ScopedVars } from '../types/ScopedVars';
|
||||
import { Field } from '../types/dataFrame';
|
||||
import { DataLink, InternalDataLink, LinkModel } from '../types/dataLink';
|
||||
import { SplitOpen, ExplorePanelsState } from '../types/explore';
|
||||
import { InterpolateFunction } from '../types/panel';
|
||||
import { DataQuery } from '../types/query';
|
||||
import { TimeRange } from '../types/time';
|
||||
|
||||
import { locationUtil } from './location';
|
||||
import { serializeStateToUrlParam, toURLRange } from './url';
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { isString } from 'lodash';
|
||||
|
||||
import { KeyValue } from '../types/data';
|
||||
import {
|
||||
DataSourcePluginOptionsEditorProps,
|
||||
SelectableValue,
|
||||
KeyValue,
|
||||
DataSourceSettings,
|
||||
DataSourceInstanceSettings,
|
||||
DataSourceRef,
|
||||
DataSourceJsonData,
|
||||
} from '../types';
|
||||
DataSourcePluginOptionsEditorProps,
|
||||
DataSourceSettings,
|
||||
} from '../types/datasource';
|
||||
import { DataSourceRef } from '../types/query';
|
||||
import { SelectableValue } from '../types/select';
|
||||
|
||||
/**
|
||||
* Convert instance settings to a reference
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { KeyValue } from '../types';
|
||||
import { KeyValue } from '../types/data';
|
||||
|
||||
// Avoid writing the warning message more than once every 10s
|
||||
const history: KeyValue<number> = {};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Labels } from '../types';
|
||||
import { Labels } from '../types/data';
|
||||
|
||||
/** replace labels in a string. Used for loki+prometheus legend formats */
|
||||
export function renderLegendFormat(aliasPattern: string, aliasData: Labels): string {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Location } from 'history';
|
||||
|
||||
import { GrafanaConfig } from '../types';
|
||||
import { GrafanaConfig } from '../types/config';
|
||||
|
||||
import { locationUtil } from './location';
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Location } from 'history';
|
||||
|
||||
import { textUtil } from '../text';
|
||||
import { GrafanaConfig, RawTimeRange, ScopedVars } from '../types';
|
||||
import { ScopedVars } from '../types/ScopedVars';
|
||||
import { GrafanaConfig } from '../types/config';
|
||||
import { RawTimeRange } from '../types/time';
|
||||
|
||||
import { UrlQueryMap, urlUtil } from './url';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user