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:
kay delaney
2019-07-03 16:36:12 +01:00
committed by GitHub
parent 22e2ac270b
commit 164fb13d99
4 changed files with 20 additions and 13 deletions

View File

@@ -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 {