Skip to content

Commit 7962c55

Browse files
committed
Fix redirection to legacy event_analytics URL (opensearch-project#383)
Signed-off-by: Joshua Li <joshuali925@gmail.com>
1 parent 64a10db commit 7962c55

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

public/components/notebooks/components/paragraph_components/para_output.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export const ParaOutput = (props: {
134134
fromObs = fromObs === 'Invalid date' ? visInput.timeRange.from : fromObs;
135135
toObs = toObs === 'Invalid date' ? visInput.timeRange.to : toObs;
136136
const onEditClick = (savedVisualizationId: string) => {
137-
window.location.assign(`#/event_analytics/explorer/${savedVisualizationId}`);
137+
window.location.assign(`observability-logs#/explorer/${savedVisualizationId}`);
138138
};
139139
return (
140140
<>
@@ -161,6 +161,7 @@ export const ParaOutput = (props: {
161161
case 'HTML':
162162
return (
163163
<EuiText key={key}>
164+
{/* eslint-disable-next-line react/jsx-pascal-case */}
164165
<Media.HTML data={val} />
165166
</EuiText>
166167
);

public/services/saved_objects/saved_object_savers/ppl/save_as_new_query.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class SaveAsNewQuery extends SavedQuerySaver {
2828
this.saveClient
2929
.create({ ...this.saveParams })
3030
.then((res: any) => {
31-
history.replace(`/event_analytics/explorer/${res.objectId}`);
31+
history.replace(`/explorer/${res.objectId}`);
3232
notifications.toasts.addSuccess({
3333
title: 'Saved successfully.',
3434
text: `New query '${name}' has been successfully saved.`,
@@ -50,7 +50,7 @@ export class SaveAsNewQuery extends SavedQuerySaver {
5050
})
5151
);
5252
});
53-
history.replace(`/event_analytics/explorer/${res.objectId}`);
53+
history.replace(`/explorer/${res.objectId}`);
5454
return res;
5555
})
5656
.catch((error: any) => {

public/services/saved_objects/saved_object_savers/ppl/save_as_new_vis.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class SaveAsNewVisualization extends SavedQuerySaver {
5454
if (appLogEvents) {
5555
addVisualizationToPanel(res.objectId, name);
5656
} else {
57-
history.replace(`/event_analytics/explorer/${res.objectId}`);
57+
history.replace(`/explorer/${res.objectId}`);
5858
}
5959

6060
batch(() => {

0 commit comments

Comments
 (0)