diff --git a/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/translations.ts b/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/translations.ts index 93dbe00c04d6..06f5c01aad5d 100644 --- a/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/translations.ts @@ -10,13 +10,13 @@ import { i18n } from '@kbn/i18n'; export const DISCOVER_SEARCH_SAVE_ERROR_TITLE = i18n.translate( 'xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_error', { - defaultMessage: 'Error while saving the Discover Saved Search', + defaultMessage: 'Error while saving the Discover search', } ); export const DISCOVER_SEARCH_SAVE_ERROR_UNKNOWN = i18n.translate( 'xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_unknown_error', { - defaultMessage: 'Unknown Error occurred while saving Discover Search', + defaultMessage: 'Unknown error occurred while saving Discover search', } ); diff --git a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts index 660d6992038c..ef6b4d265a5a 100644 --- a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts +++ b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts @@ -1630,7 +1630,7 @@ export const mockTimelineResults: OpenTimelineResult[] = [ noteIds: ['noteId4'], notes: [ { - note: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Magna ac placerat vestibulum lectus. Morbi tincidunt ornare massa eget egestas purus. Quis various quam quisque id diam. Nulla pellentesque dignissim enim sit amet.', + note: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Magna ac placerat vestibulum lectus. Morbi tincidunt ornare massa eget egestas purus. Quis varius quam quisque id diam. Nulla pellentesque dignissim enim sit amet.', savedObjectId: 'noteId1', updated: 1553700738 * 1000, updatedBy: 'alice', diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/index.tsx index 7584583e57fe..b7c11d1aeedd 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/index.tsx @@ -30,6 +30,7 @@ import { useShallowEqualSelector } from '../../../../common/hooks/use_selector'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { savedSearchComparator } from './utils'; import { setIsDiscoverSavedSearchLoaded } from '../../../store/timeline/actions'; +import { GET_TIMELINE_DISCOVER_SAVED_SEARCH_TITLE } from './translations'; const HideSearchSessionIndicatorBreadcrumbIcon = createGlobalStyle` [data-test-subj='searchSessionIndicator'] { @@ -154,7 +155,7 @@ export const DiscoverTabContent: FC = ({ timelineId }) refreshInterval: discoverStateContainer.current?.globalState.get()?.refreshInterval, breakdownField: discoverStateContainer.current?.appState.getState().breakdownField, rowsPerPage: discoverStateContainer.current?.appState.getState().rowsPerPage, - title: `Saved Search for timeline - ${title}`, + title: GET_TIMELINE_DISCOVER_SAVED_SEARCH_TITLE(title), description, }; }, [ diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/translations.ts new file mode 100644 index 000000000000..e97da8b29c65 --- /dev/null +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/discover_tab_content/translations.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const GET_TIMELINE_DISCOVER_SAVED_SEARCH_TITLE = (title: string) => + i18n.translate('xpack.securitySolution.timelines.discoverInTimeline.savedSearchTitle', { + defaultMessage: 'Saved search for timeline - {title}', + values: { title }, + }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/discover/discover_timeline_state_integration.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/discover/discover_timeline_state_integration.cy.ts index bb8810439c02..434ff9099c0f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/discover/discover_timeline_state_integration.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/discover/discover_timeline_state_integration.cy.ts @@ -43,7 +43,6 @@ import { openTimelineFromSettings, } from '../../../../tasks/timeline'; import { LOADING_INDICATOR } from '../../../../screens/security_header'; -import { enableDiscoverSQL } from '../../../../tasks/api_calls/kibana_advanced_settings'; import { STACK_MANAGEMENT_PAGE } from '../../../../screens/kibana_navigation'; import { GET_SAVED_OBJECTS_TAGS_OPTION, @@ -109,7 +108,6 @@ describe( } }); login(); - enableDiscoverSQL(); visit(ALERTS_URL); createNewTimeline(); gotToDiscoverTab(); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/api_calls/kibana_advanced_settings.ts b/x-pack/test/security_solution_cypress/cypress/tasks/api_calls/kibana_advanced_settings.ts index 83b464c91710..ea20c8f9b2d2 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/api_calls/kibana_advanced_settings.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/api_calls/kibana_advanced_settings.ts @@ -33,11 +33,3 @@ export const disableRelatedIntegrations = () => { export const disableExpandableFlyout = () => { setKibanaSetting(ENABLE_EXPANDABLE_FLYOUT_SETTING, false); }; - -export const enableDiscoverSQL = () => { - setKibanaSetting(ADVANCED_SETTINGS.DISCOVER_SQL, true); -}; - -export const disableDiscoverSQL = () => { - setKibanaSetting(ADVANCED_SETTINGS.DISCOVER_SQL, false); -};