diff --git a/x-pack/plugins/security_solution/public/app/solution_navigation/links/app_links.ts b/x-pack/plugins/security_solution/public/app/solution_navigation/links/app_links.ts index f6a51f1d25f4f..e0b9016f0e6b8 100644 --- a/x-pack/plugins/security_solution/public/app/solution_navigation/links/app_links.ts +++ b/x-pack/plugins/security_solution/public/app/solution_navigation/links/app_links.ts @@ -8,11 +8,7 @@ import { SecurityPageName } from '@kbn/security-solution-navigation'; import { cloneDeep, remove, find } from 'lodash'; import type { AppLinkItems, LinkItem } from '../../../common/links/types'; -import { - createInvestigationsLinkFromNotes, - createInvestigationsLinkFromTimeline, - updateInvestigationsLinkFromNotes, -} from './sections/investigations_links'; +import { createInvestigationsLink, createTimelineLink } from './sections/investigations_links'; import { mlAppLink } from './sections/ml_links'; import { createAssetsLinkFromManage } from './sections/assets_links'; import { createSettingsLinksFromManage } from './sections/settings_links'; @@ -24,25 +20,6 @@ import { createSettingsLinksFromManage } from './sections/settings_links'; export const solutionAppLinksSwitcher = (appLinks: AppLinkItems): AppLinkItems => { const solutionAppLinks = cloneDeep(appLinks) as LinkItem[]; - // Remove timeline link - const [timelineLinkItem] = remove(solutionAppLinks, { id: SecurityPageName.timelines }); - if (timelineLinkItem) { - solutionAppLinks.push(createInvestigationsLinkFromTimeline(timelineLinkItem)); - } - - // Remove note link - const investigationsLinkItem = find(solutionAppLinks, { id: SecurityPageName.investigations }); - const [noteLinkItem] = remove(solutionAppLinks, { id: SecurityPageName.notes }); - if (noteLinkItem) { - if (!investigationsLinkItem) { - solutionAppLinks.push(createInvestigationsLinkFromNotes(noteLinkItem)); - } else { - solutionAppLinks.push( - updateInvestigationsLinkFromNotes(investigationsLinkItem, noteLinkItem) - ); - } - } - // Remove manage link const [manageLinkItem] = remove(solutionAppLinks, { id: SecurityPageName.administration }); @@ -51,6 +28,22 @@ export const solutionAppLinksSwitcher = (appLinks: AppLinkItems): AppLinkItems = solutionAppLinks.push(...createSettingsLinksFromManage(manageLinkItem)); } + // Create investigations link + const investigationsLinks = []; + const [timelineLinkItem] = remove(solutionAppLinks, { id: SecurityPageName.timelines }); + if (timelineLinkItem) { + investigationsLinks.push(createTimelineLink(timelineLinkItem)); + } + if (manageLinkItem) { + const noteLinkItem = find(manageLinkItem.links, { id: SecurityPageName.notes }); + if (noteLinkItem) { + investigationsLinks.push(noteLinkItem); + } + } + if (investigationsLinks.length > 0) { + solutionAppLinks.push(createInvestigationsLink(investigationsLinks)); + } + // Add ML link solutionAppLinks.push(mlAppLink); diff --git a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_links.ts b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_links.ts index 1e2fe4dc5cf36..ddcd88667d967 100644 --- a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_links.ts +++ b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_links.ts @@ -24,37 +24,16 @@ const investigationsAppLink: LinkItem = { links: [], // timeline and note links are added via the methods below }; -export const createInvestigationsLinkFromTimeline = (timelineLink: LinkItem): LinkItem => { - return { - ...investigationsAppLink, - links: [ - { ...timelineLink, description: i18n.TIMELINE_DESCRIPTION, landingIcon: IconTimelineLazy }, - ], - }; -}; - -export const createInvestigationsLinkFromNotes = (noteLink: LinkItem): LinkItem => { - return { - ...investigationsAppLink, - links: [{ ...noteLink, description: i18n.NOTE_DESCRIPTION, landingIcon: IconTimelineLazy }], - }; -}; +export const createInvestigationsLink = (links: LinkItem[]): LinkItem => ({ + ...investigationsAppLink, + links, +}); -export const updateInvestigationsLinkFromNotes = ( - investigationsLink: LinkItem, - noteLink: LinkItem -): LinkItem => { - const currentLinks = investigationsLink.links ?? []; - currentLinks.push({ - ...noteLink, - description: i18n.NOTE_DESCRIPTION, - landingIcon: 'filebeatApp', - }); - return { - ...investigationsLink, - links: currentLinks, - }; -}; +export const createTimelineLink = (timelineLink: LinkItem): LinkItem => ({ + ...timelineLink, + description: i18n.TIMELINE_DESCRIPTION, + landingIcon: IconTimelineLazy, +}); // navLinks define the navigation links for the Security Solution pages and External pages as well export const investigationsNavLinks: SolutionNavLink[] = [ diff --git a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_translations.ts b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_translations.ts index 931c3c20d4002..55c6fe74f846d 100644 --- a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_translations.ts +++ b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/investigations_translations.ts @@ -21,14 +21,6 @@ export const TIMELINE_DESCRIPTION = i18n.translate( } ); -export const NOTE_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.navLinks.investigations.note.title', - { - defaultMessage: - 'Oversee, revise, and revisit the notes attached to alerts, events and Timelines.', - } -); - export const OSQUERY_TITLE = i18n.translate( 'xpack.securitySolution.navLinks.investigations.osquery.title', { diff --git a/x-pack/plugins/security_solution/public/app_links.ts b/x-pack/plugins/security_solution/public/app_links.ts index 481b58949ed24..dca76b1c37f70 100644 --- a/x-pack/plugins/security_solution/public/app_links.ts +++ b/x-pack/plugins/security_solution/public/app_links.ts @@ -6,7 +6,6 @@ */ import type { CoreStart } from '@kbn/core/public'; -import { links as notesLink } from './notes/links'; import { links as attackDiscoveryLinks } from './attack_discovery/links'; import type { AppLinkItems } from './common/links/types'; import { indicatorsLinks } from './threat_intelligence/links'; @@ -36,7 +35,6 @@ export const appLinks: AppLinkItems = Object.freeze([ rulesLinks, onboardingLinks, managementLinks, - notesLink, ]); export const getFilteredLinks = async ( @@ -57,6 +55,5 @@ export const getFilteredLinks = async ( rulesLinks, onboardingLinks, managementFilteredLinks, - notesLink, ]); }; diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index 61cbc1a511c09..49049218d4dc1 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -21,7 +21,6 @@ import { EVENT_FILTERS_PATH, HOST_ISOLATION_EXCEPTIONS_PATH, MANAGE_PATH, - NOTES_PATH, POLICIES_PATH, RESPONSE_ACTIONS_HISTORY_PATH, SecurityPageName, @@ -38,13 +37,13 @@ import { RESPONSE_ACTIONS_HISTORY, TRUSTED_APPLICATIONS, ENTITY_ANALYTICS_RISK_SCORE, - NOTES, ENTITY_STORE, } from '../app/translations'; import { licenseService } from '../common/hooks/use_license'; import type { LinkItem } from '../common/links/types'; import type { StartPlugins } from '../types'; import { cloudDefendLink } from '../cloud_defend/links'; +import { links as notesLink } from '../notes/links'; import { IconConsole } from '../common/icons/console'; import { IconShield } from '../common/icons/shield'; import { IconEndpoints } from '../common/icons/endpoints'; @@ -218,20 +217,7 @@ export const links: LinkItem = { hideTimeline: true, }, cloudDefendLink, - { - id: SecurityPageName.notes, - title: NOTES, - description: i18n.translate('xpack.securitySolution.appLinks.notesDescription', { - defaultMessage: - 'Oversee, revise, and revisit the notes attached to alerts, events and Timelines.', - }), - landingIcon: 'filebeatApp', - path: NOTES_PATH, - skipUrlState: true, - hideTimeline: true, - hideWhenExperimentalKey: 'securitySolutionNotesDisabled', - globalSearchDisabled: true, - }, + notesLink, ], }; diff --git a/x-pack/plugins/security_solution/public/notes/links.ts b/x-pack/plugins/security_solution/public/notes/links.ts index b09877e200fb9..628904ae30c41 100644 --- a/x-pack/plugins/security_solution/public/notes/links.ts +++ b/x-pack/plugins/security_solution/public/notes/links.ts @@ -12,14 +12,15 @@ import type { LinkItem } from '../common/links/types'; export const links: LinkItem = { id: SecurityPageName.notes, - title: NOTES, path: NOTES_PATH, + title: NOTES, + description: i18n.translate('xpack.securitySolution.appLinks.notesDescription', { + defaultMessage: + 'Oversee, revise, and revisit the notes attached to alerts, events and Timelines.', + }), capabilities: [`${SERVER_APP_ID}.show`], - globalSearchKeywords: [ - i18n.translate('xpack.securitySolution.appLinks.notes', { - defaultMessage: 'Notes', - }), - ], - links: [], + landingIcon: 'filebeatApp', + skipUrlState: true, + hideTimeline: true, hideWhenExperimentalKey: 'securitySolutionNotesDisabled', }; diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 031d30da1d689..0f5c34aaae9f6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -37223,7 +37223,6 @@ "xpack.securitySolution.appLinks.network.flows": "Flux", "xpack.securitySolution.appLinks.network.http": "HTTP", "xpack.securitySolution.appLinks.network.tls": "TLS", - "xpack.securitySolution.appLinks.notes": "Notes", "xpack.securitySolution.appLinks.notesDescription": "Superviser, réviser et revoir les annotations dans chaque document et chronologie.", "xpack.securitySolution.appLinks.overview": "Aperçu", "xpack.securitySolution.appLinks.overviewDescription": "Résumé de votre activité d'environnement de sécurité, y compris les alertes, les événements, les éléments récents et un fil d'actualités !", @@ -41698,7 +41697,6 @@ "xpack.securitySolution.navLinks.assets.title": "Ressources", "xpack.securitySolution.navLinks.devTools.title": "Outils de développeur", "xpack.securitySolution.navLinks.discover.title": "Discover", - "xpack.securitySolution.navLinks.investigations.note.title": "Superviser, réviser et revoir les annotations dans chaque document et chronologie", "xpack.securitySolution.navLinks.investigations.osquery.description": "Déployez Osquery avec Elastic Agent, puis exécutez et planifiez des requêtes dans Kibana", "xpack.securitySolution.navLinks.investigations.osquery.title": "Osquery", "xpack.securitySolution.navLinks.investigations.timeline.title": "Emplacement central pour les chronologies et les modèles de chronologies", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 598d3ec88bdcf..28840b8c7765c 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -37190,7 +37190,6 @@ "xpack.securitySolution.appLinks.network.flows": "Flow", "xpack.securitySolution.appLinks.network.http": "HTTP", "xpack.securitySolution.appLinks.network.tls": "TLS", - "xpack.securitySolution.appLinks.notes": "メモ", "xpack.securitySolution.appLinks.notesDescription": "各ドキュメントとタイムライン内の注釈を監視、修正、再検討します。", "xpack.securitySolution.appLinks.overview": "概要", "xpack.securitySolution.appLinks.overviewDescription": "アラート、イベント、最近のアイテム、ニュースフィードを含む、セキュリティ環境アクティビティの概要。", @@ -41664,7 +41663,6 @@ "xpack.securitySolution.navLinks.assets.title": "アセット", "xpack.securitySolution.navLinks.devTools.title": "開発者ツール", "xpack.securitySolution.navLinks.discover.title": "Discover", - "xpack.securitySolution.navLinks.investigations.note.title": "各ドキュメントとタイムライン内の注釈を監視、修正、再検討します", "xpack.securitySolution.navLinks.investigations.osquery.description": "ElasticエージェントでOsqueryをデプロイし、Kibanaでクエリを実行、スケジュールします。", "xpack.securitySolution.navLinks.investigations.osquery.title": "Osquery", "xpack.securitySolution.navLinks.investigations.timeline.title": "タイムラインとタイムラインテンプレートの一元的な場所", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 04094ba79b878..918a37764c448 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -36590,7 +36590,6 @@ "xpack.securitySolution.appLinks.network.flows": "流", "xpack.securitySolution.appLinks.network.http": "HTTP", "xpack.securitySolution.appLinks.network.tls": "TLS", - "xpack.securitySolution.appLinks.notes": "备注", "xpack.securitySolution.appLinks.notesDescription": "监管、修正和重新访问每个文档或时间线内的标注。", "xpack.securitySolution.appLinks.overview": "概览", "xpack.securitySolution.appLinks.overviewDescription": "您的安全环境活动摘要,包括告警、事件、最近项和新闻源!", @@ -41021,7 +41020,6 @@ "xpack.securitySolution.navLinks.assets.title": "资产", "xpack.securitySolution.navLinks.devTools.title": "开发者工具", "xpack.securitySolution.navLinks.discover.title": "Discover", - "xpack.securitySolution.navLinks.investigations.note.title": "监管、修正和重新访问每个文档或时间线内的标注", "xpack.securitySolution.navLinks.investigations.osquery.description": "使用 Elastic 代理部署 Osquery,然后在 Kibana 运行并排定查询", "xpack.securitySolution.navLinks.investigations.osquery.title": "Osquery", "xpack.securitySolution.navLinks.investigations.timeline.title": "时间线和时间线模板的中心位置",