mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Adds orgId to URL for sharing purposes (#17895)
Also replaces one-off segment detection functions in explore.ts with general purpose function Closes #15462
This commit is contained in:
@@ -2,7 +2,7 @@ import { DataSourceApi } from '@grafana/ui/src/types/datasource';
|
||||
|
||||
import { ExploreId, ExploreItemState, ExploreState } from 'app/types/explore';
|
||||
import { makeExploreItemState } from 'app/features/explore/state/reducers';
|
||||
import { StoreState } from 'app/types';
|
||||
import { StoreState, UserState } from 'app/types';
|
||||
import { TimeRange, dateTime } from '@grafana/ui';
|
||||
|
||||
export const mockExploreState = (options: any = {}) => {
|
||||
@@ -77,8 +77,15 @@ export const mockExploreState = (options: any = {}) => {
|
||||
right,
|
||||
split,
|
||||
};
|
||||
|
||||
const user: UserState = {
|
||||
orgId: 1,
|
||||
timeZone: 'browser',
|
||||
};
|
||||
|
||||
const state: Partial<StoreState> = {
|
||||
explore,
|
||||
user,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user