mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution][Navigation] Unify Notes link (#199374)](https://github.com/elastic/kibana/pull/199374) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sergi Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2024-11-08T09:43:30Z","message":"[SecuritySolution][Navigation] Unify Notes link (#199374)\n\n## Summary\r\n\r\nBug Issue: https://github.com/elastic/kibana/issues/197694\r\n\r\nUnify the Notes link configuration.\r\n\r\n- ESS classic nav (default) -> subLink of the `Manage` section\r\n- ESS solution nav / Serverless -> `Manage` section is removed and the\r\n`Notes` link is relocated as a sublink of the `Investigations` section\r\n \r\nBreadcrumbs and global search results are now consistent with the page's\r\nlocation in each environment.\r\n\r\n### Screenshots\r\n\r\nClassic nav:\r\n\r\n\r\n\r\nSolution nav:\r\n\r\n","sha":"fb4ed90cae6f2c2ad426648f5a352b05b5e2bdfc","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:Threat Hunting","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[SecuritySolution][Navigation] Unify Notes link","number":199374,"url":"https://github.com/elastic/kibana/pull/199374","mergeCommit":{"message":"[SecuritySolution][Navigation] Unify Notes link (#199374)\n\n## Summary\r\n\r\nBug Issue: https://github.com/elastic/kibana/issues/197694\r\n\r\nUnify the Notes link configuration.\r\n\r\n- ESS classic nav (default) -> subLink of the `Manage` section\r\n- ESS solution nav / Serverless -> `Manage` section is removed and the\r\n`Notes` link is relocated as a sublink of the `Investigations` section\r\n \r\nBreadcrumbs and global search results are now consistent with the page's\r\nlocation in each environment.\r\n\r\n### Screenshots\r\n\r\nClassic nav:\r\n\r\n\r\n\r\nSolution nav:\r\n\r\n","sha":"fb4ed90cae6f2c2ad426648f5a352b05b5e2bdfc"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199374","number":199374,"mergeCommit":{"message":"[SecuritySolution][Navigation] Unify Notes link (#199374)\n\n## Summary\r\n\r\nBug Issue: https://github.com/elastic/kibana/issues/197694\r\n\r\nUnify the Notes link configuration.\r\n\r\n- ESS classic nav (default) -> subLink of the `Manage` section\r\n- ESS solution nav / Serverless -> `Manage` section is removed and the\r\n`Notes` link is relocated as a sublink of the `Investigations` section\r\n \r\nBreadcrumbs and global search results are now consistent with the page's\r\nlocation in each environment.\r\n\r\n### Screenshots\r\n\r\nClassic nav:\r\n\r\n\r\n\r\nSolution nav:\r\n\r\n","sha":"fb4ed90cae6f2c2ad426648f5a352b05b5e2bdfc"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/199431","number":199431,"state":"OPEN"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
This commit is contained in:
parent
393b0c7a9c
commit
43f304b0ea
9 changed files with 36 additions and 94 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 createInvestigationsLink = (links: LinkItem[]): LinkItem => ({
|
||||
...investigationsAppLink,
|
||||
links,
|
||||
});
|
||||
|
||||
export const createInvestigationsLinkFromNotes = (noteLink: LinkItem): LinkItem => {
|
||||
return {
|
||||
...investigationsAppLink,
|
||||
links: [{ ...noteLink, description: i18n.NOTE_DESCRIPTION, landingIcon: IconTimelineLazy }],
|
||||
};
|
||||
};
|
||||
|
||||
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[] = [
|
||||
|
|
|
@ -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',
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
@ -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',
|
||||
};
|
||||
|
|
|
@ -37253,7 +37253,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 !",
|
||||
|
@ -41731,7 +41730,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",
|
||||
|
|
|
@ -37220,7 +37220,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": "アラート、イベント、最近のアイテム、ニュースフィードを含む、セキュリティ環境アクティビティの概要。",
|
||||
|
@ -41697,7 +41696,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": "タイムラインとタイムラインテンプレートの一元的な場所",
|
||||
|
|
|
@ -37289,7 +37289,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": "您的安全环境活动摘要,包括告警、事件、最近项和新闻源!",
|
||||
|
@ -41768,7 +41767,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": "时间线和时间线模板的中心位置",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue