Skip to content

Commit

Permalink
fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Feb 28, 2020
1 parent 79b301d commit fa8ef7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
syncStates,
BaseStateContainer,
} from '../../../../../../../plugins/kibana_utils/public';
import { esFilters, FilterManager, Filter } from '../../../../../../../plugins/data/public';
import { esFilters, FilterManager, Filter, Query } from '../../../../../../../plugins/data/public';

interface AppState {
/**
Expand All @@ -47,6 +47,7 @@ interface AppState {
* Number of records to be fetched after the anchor records (older records)
*/
successorCount: number;
query: Query;
}

interface GlobalState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import uuid from 'uuid/v4';
import rison from 'rison-node';
import { IFieldType, IIndexPattern } from 'src/plugins/data/public';
import { AppState } from '../../../angular/context_state';
import { getServices } from '../../../../kibana_services';

function getMapsAppBaseUrl() {
Expand Down Expand Up @@ -48,7 +49,7 @@ export function isFieldVisualizable(field: IFieldType) {
export function getMapsAppUrl(
field: IFieldType,
indexPattern: IIndexPattern,
appState: any,
appState: AppState,
columns: string[]
) {
const mapAppParams = new URLSearchParams();
Expand All @@ -57,7 +58,10 @@ export function getMapsAppUrl(
const locationSplit = window.location.href.split('discover?');
if (locationSplit.length > 1) {
const discoverParams = new URLSearchParams(locationSplit[1]);
mapAppParams.set('_g', discoverParams.get('_g'));
const globalStateUrlValue = discoverParams.get('_g');
if (globalStateUrlValue) {
mapAppParams.set('_g', globalStateUrlValue);
}
}

// Copy filters and query in app state
Expand Down

0 comments on commit fa8ef7b

Please sign in to comment.