Skip to content

Commit

Permalink
[ML] add export, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jan 16, 2020
1 parent 2ac8133 commit 40d9646
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { getUrlState } from './url_state';

describe('getUrlState', () => {
test('properly docode url with _g and _a', () => {
test('properly decode url with _g and _a', () => {
expect(
getUrlState(
"?_a=(mlExplorerFilter:(),mlExplorerSwimlane:(viewByFieldName:action),query:(query_string:(analyze_wildcard:!t,query:'*')))&_g=(ml:(jobIds:!(dec-2)),refreshInterval:(display:Off,pause:!f,value:0),time:(from:'2019-01-01T00:03:40.000Z',mode:absolute,to:'2019-08-30T11:55:07.000Z'))&savedSearchId=571aaf70-4c88-11e8-b3d7-01146121b73d"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type SetUrlState = (attribute: string | Dictionary<any>, value?: any) =>
export type UrlState = [Dictionary<any>, SetUrlState];

const decodedParams = new Set(['_a', '_g']);
function getUrlState(search: string) {
export function getUrlState(search: string): Dictionary<any> {
const urlState: Dictionary<any> = {};
const parsedQueryString = queryString.parse(search);

Expand Down

0 comments on commit 40d9646

Please sign in to comment.