Skip to content

Commit 7f62f3e

Browse files
fix: create report from context menu
Signed-off-by: tender-barbarian <[email protected]>
1 parent 7790110 commit 7f62f3e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

public/components/context_menu/context_menu_helpers.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@ export const contextMenuCreateReportDefinition = (baseURI) => {
4949
const timeRanges = getTimeFieldsFromUrl();
5050

5151
// check report source
52-
if (/\/app\/dashboards/.test(baseURI)) {
52+
if (/\/app\/data-explorer\/dashboards/.test(baseURI)) {
5353
reportSource = 'dashboard:';
54-
} else if (/\/app\/visualize/.test(baseURI)) {
54+
} else if (/\/app\/data-explorer\/visualize/.test(baseURI)) {
5555
reportSource = 'visualize:';
56-
} else if (/\/app\/discover/.test(baseURI)) {
56+
} else if (/\/app\/data-explorer\/discover/.test(baseURI)) {
5757
reportSource = 'discover:';
5858
}
5959
reportSource += reportSourceId.toString();
60-
window.location.assign(
61-
`reports-dashboards#/create?previous=${reportSource}?timeFrom=${timeRanges.time_from.toISOString()}?timeTo=${timeRanges.time_to.toISOString()}`
62-
);
60+
applicationService.getApplication().navigateToApp(PLUGIN_ID, { path: `#/create?previous=${reportSource}?timeFrom=${timeRanges.time_from.toISOString()}?timeTo=${timeRanges.time_to.toISOString()}`});
61+
6362
};
6463

6564
export const displayLoadingModal = () => {

0 commit comments

Comments
 (0)