diff --git a/dashboards-reports/public/components/context_menu/context_menu.js b/dashboards-reports/public/components/context_menu/context_menu.js index 689fff36..e530472f 100644 --- a/dashboards-reports/public/components/context_menu/context_menu.js +++ b/dashboards-reports/public/components/context_menu/context_menu.js @@ -5,7 +5,6 @@ /* eslint-disable no-restricted-globals */ import $ from 'jquery'; -import dateMath from '@elastic/datemath'; import { i18n } from '@osd/i18n'; import { readStreamToFile } from '../main/main_utils'; import { @@ -21,9 +20,7 @@ import { popoverMenuDiscover, getMenuItem, } from './context_menu_ui'; -import { timeRangeMatcher } from '../utils/utils'; import { parse } from 'url'; -import { unhashUrl } from '../../../../../src/plugins/opensearch_dashboards_utils/public'; import { uiSettingsService } from '../utils/settings_service'; const generateInContextReport = async ( @@ -126,11 +123,8 @@ const generateInContextReport = async ( }; // try to match uuid and user entered custom-id followed by '?' in URL, which would be the saved search id for discover URL -// custom id example: v1s-f00-b4r1-01 -const getUuidFromUrl = () => - window.location.href.match( - /([0-9a-z]+-[0-9a-z]+)+\?/ - ); +// custom id example: v1s-f00-b4r1-01, Filebeat-Apache-Dashboard-ecs, +const getUuidFromUrl = () => window.location.href.match(/[0-9a-zA-Z-]+\?/); const isDiscover = () => window.location.href.includes('discover'); // open Download drop-down