forked from SigNoz/signoz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globalTime.ts
48 lines (39 loc) · 1.2 KB
/
globalTime.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
41
42
43
44
45
46
47
48
import { Time } from 'container/TopNav/DateTimeSelection/config';
import {
CustomTimeType,
Time as TimeV2,
} from 'container/TopNav/DateTimeSelectionV2/config';
import { ResetIdStartAndEnd, SetSearchQueryString } from './logs';
export const UPDATE_TIME_INTERVAL = 'UPDATE_TIME_INTERVAL';
export const GLOBAL_TIME_LOADING_START = 'GLOBAL_TIME_LOADING_START';
export const UPDATE_AUTO_REFRESH_DISABLED = 'UPDATE_AUTO_REFRESH_DISABLED';
export const UPDATE_AUTO_REFRESH_INTERVAL = 'UPDATE_AUTO_REFRESH_INTERVAL';
export type GlobalTime = {
maxTime: number;
minTime: number;
};
interface UpdateTime extends GlobalTime {
selectedTime: Time | TimeV2 | CustomTimeType;
}
interface UpdateTimeInterval {
type: typeof UPDATE_TIME_INTERVAL;
payload: UpdateTime;
}
interface UpdateAutoRefreshDisabled {
type: typeof UPDATE_AUTO_REFRESH_DISABLED;
payload: boolean;
}
interface GlobalTimeLoading {
type: typeof GLOBAL_TIME_LOADING_START;
}
interface UpdateAutoRefreshInterval {
type: typeof UPDATE_AUTO_REFRESH_INTERVAL;
payload: string;
}
export type GlobalTimeAction =
| UpdateTimeInterval
| GlobalTimeLoading
| UpdateAutoRefreshDisabled
| UpdateAutoRefreshInterval
| ResetIdStartAndEnd
| SetSearchQueryString;