Skip to content

Commit ef568f7

Browse files
committed
fix: re encode params when redirecting from graph to query-browser
Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
1 parent 57c3f91 commit ef568f7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

web/src/components/redirects/prometheus-redirect-page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ const PrometheusRouterRedirect: FC = () => {
1111

1212
const params = getAllQueryArguments();
1313
// leaving perspective redirect to future work
14-
return <Navigate to={`/${urlRoot}/query-browser?query0=${params['g0.expr'] || ''}`} />;
14+
return (
15+
<Navigate
16+
to={`/${urlRoot}/query-browser?query0=${
17+
params['g0.expr'] ? encodeURIComponent(params['g0.expr']) : ''
18+
}`}
19+
/>
20+
);
1521
};
1622

1723
export default PrometheusRouterRedirect;

0 commit comments

Comments
 (0)