Skip to content

Commit 9dab86d

Browse files
committed
Use QueryString.encode instead of encodeURIComponent
1 parent d483ed7 commit 9dab86d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/legacy/plugins/infra/public/pages/logs/analysis/sections/analyze_in_ml_button.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import url from 'url';
99
import { EuiButton } from '@elastic/eui';
1010
import { FormattedMessage } from '@kbn/i18n/react';
1111
import chrome from 'ui/chrome';
12+
import { QueryString } from 'ui/utils/query_string';
1213
import { encode } from 'rison-node';
1314
import { TimeRange } from '../../../../../common/http_api/shared/time_range';
1415

@@ -51,7 +52,7 @@ const getOverallAnomalyExplorerLink = (pathname: string, jobId: string, timeRang
5152
},
5253
});
5354

54-
const hash = `/explorer?_g=${_g}`;
55+
const hash = `/explorer?${QueryString.encode({ _g })}`;
5556

5657
return url.format({
5758
pathname,
@@ -84,7 +85,7 @@ const getPartitionSpecificSingleMetricViewerLink = (
8485
},
8586
});
8687

87-
const hash = `/timeseriesexplorer?_g=${_g}&_a=${encodeURIComponent(_a)}`;
88+
const hash = `/timeseriesexplorer?${QueryString.encode({ _g, _a })}`;
8889

8990
return url.format({
9091
pathname,

0 commit comments

Comments
 (0)