mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[SecuritySolution][Navigation] Unify Notes link (#199374)
## Summary Bug Issue: https://github.com/elastic/kibana/issues/197694 Unify the Notes link configuration. - ESS classic nav (default) -> subLink of the `Manage` section - ESS solution nav / Serverless -> `Manage` section is removed and the `Notes` link is relocated as a sublink of the `Investigations` section Breadcrumbs and global search results are now consistent with the page's location in each environment. ### Screenshots Classic nav:   Solution nav:  
This commit is contained in:
parent
cd7447db36
commit
fb4ed90cae
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',
|
||||
};
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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": "タイムラインとタイムラインテンプレートの一元的な場所",
|
||||
|
|
|
@ -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": "时间线和时间线模板的中心位置",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue