Skip to content

Commit

Permalink
Fix redirection to legacy event_analytics URL (#383)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 authored Apr 18, 2023
1 parent 5383616 commit 23e09e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const ParaOutput = (props: {
fromObs = fromObs === 'Invalid date' ? visInput.timeRange.from : fromObs;
toObs = toObs === 'Invalid date' ? visInput.timeRange.to : toObs;
const onEditClick = (savedVisualizationId: string) => {
window.location.assign(`#/event_analytics/explorer/${savedVisualizationId}`);
window.location.assign(`observability-logs#/explorer/${savedVisualizationId}`);
};
return (
<>
Expand All @@ -161,6 +161,7 @@ export const ParaOutput = (props: {
case 'HTML':
return (
<EuiText key={key}>
{/* eslint-disable-next-line react/jsx-pascal-case */}
<Media.HTML data={val} />
</EuiText>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class SaveAsNewQuery extends SavedQuerySaver {
this.saveClient
.create({ ...this.saveParams })
.then((res: any) => {
history.replace(`/event_analytics/explorer/${res.objectId}`);
history.replace(`/explorer/${res.objectId}`);
notifications.toasts.addSuccess({
title: 'Saved successfully.',
text: `New query '${name}' has been successfully saved.`,
Expand All @@ -50,7 +50,7 @@ export class SaveAsNewQuery extends SavedQuerySaver {
})
);
});
history.replace(`/event_analytics/explorer/${res.objectId}`);
history.replace(`/explorer/${res.objectId}`);
return res;
})
.catch((error: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class SaveAsNewVisualization extends SavedQuerySaver {
if (appLogEvents) {
addVisualizationToPanel(res.objectId, name);
} else {
history.replace(`/event_analytics/explorer/${res.objectId}`);
history.replace(`/explorer/${res.objectId}`);
}

batch(() => {
Expand Down

0 comments on commit 23e09e5

Please sign in to comment.