-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconf.ts
40 lines (33 loc) · 1.01 KB
/
conf.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {
MetricAggregation,
MetricAggregationType,
Logs as SchemaLogs,
} from '@/dataquery.gen';
import { Logs, LogsSortDirection } from "@/types";
export type QuickwitMetricAggregationType = Extract<'count' | 'avg' | 'sum' | 'min' | 'max' | 'percentiles' | 'raw_data' | 'logs', MetricAggregationType >
export type MetricsDefaultSettings = Partial<{
[T in QuickwitMetricAggregationType]: Omit<Extract<Exclude<MetricAggregation,SchemaLogs>|Logs, { type: T }>, 'id' | 'type'>;
}>;
export const defaultMetricAggregationConfig: MetricsDefaultSettings = {
percentiles: {
settings: {
percents: ['25', '50', '75', '95', '99'],
},
},
raw_data: {
settings: {
size: '100',
},
},
logs: {
settings: {
limit: '100',
sortDirection:'desc' as LogsSortDirection
},
},
};
export const defaultConfig = {
metricAggregation: defaultMetricAggregationConfig
};
export type DefaultsConfig = typeof defaultConfig
export type DefaultsConfigOverrides = {[key: string]: any};