mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 17:43:35 -06:00
Explore now uses the timezone of the user to decide if local browser time or UTC should be used. - Now uses TimeRange instead of RawTimeRange in explore item state tree and only parsing actual time in a few action handlers. - Time picker should now properly handle moving back/forward and apply time range when both utc and non utc time zone. - URL range representation is changed from YYYY-MM-DD HH:mm:ss to epoch ms. - Now uses AbsoluteTimeRange in graph component instead of moment. - Makes a copy of the time range passed to timeSrv to make sure immutability of explore time range when for example elasticsearch test datasources uses timeSrv and sets a time range of last 1 min. - Various refactorings and cleanup. Closes #12812
16 lines
343 B
TypeScript
16 lines
343 B
TypeScript
import { UserState } from 'app/types';
|
|
import config from 'app/core/config';
|
|
|
|
export const initialState: UserState = {
|
|
orgId: config.bootData.user.orgId,
|
|
timeZone: config.bootData.user.timezone,
|
|
};
|
|
|
|
export const userReducer = (state = initialState, action: any): UserState => {
|
|
return state;
|
|
};
|
|
|
|
export default {
|
|
user: userReducer,
|
|
};
|