[Security Solution] Add missing explore tab links to global search (#180319)

## Summary

fixes: https://github.com/elastic/kibana/issues/180268

Adds the 3 missing tab links to the global search:

- Hosts / All hosts
- Users / All users
- Network / Flows

### Screenshots


<img width="648" alt="Captura de pantalla 2024-04-08 a les 19 14 31"
src="c18ff55d-1b35-4b43-a312-61ef5497c1fb">

---

<img width="648" alt="All users"
src="1d30470e-bc8e-4392-989e-200d09dcfdf6">

---

<img width="648" alt="flows"
src="7019f079-229a-470b-ac15-3997e1379759">
This commit is contained in:
Sergi Massaneda 2024-04-12 13:09:33 +02:00 committed by GitHub
parent b590272c2b
commit fb9d0956c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 6 deletions

View file

@ -42,9 +42,12 @@ export enum SecurityPageName {
exploreLanding = 'explore',
hostIsolationExceptions = 'host_isolation_exceptions',
hosts = 'hosts',
hostsAll = 'hosts-all',
hostsAnomalies = 'hosts-anomalies',
hostsRisk = 'hosts-risk',
hostsEvents = 'hosts-events',
hostsSessions = 'hosts-sessions',
hostsUncommonProcesses = 'hosts-uncommon_processes',
investigations = 'investigations',
kubernetes = 'kubernetes',
landing = 'get_started',
@ -53,6 +56,7 @@ export enum SecurityPageName {
networkAnomalies = 'network-anomalies',
networkDns = 'network-dns',
networkEvents = 'network-events',
networkFlows = 'network-flows',
networkHttp = 'network-http',
networkTls = 'network-tls',
noPage = '',
@ -63,7 +67,6 @@ export enum SecurityPageName {
rulesAdd = 'rules-add',
rulesCreate = 'rules-create',
rulesLanding = 'rules-landing',
sessions = 'sessions',
/*
* Warning: Computed values are not permitted in an enum with string valued members
* All threat intelligence page names must match `TIPageId` in x-pack/plugins/threat_intelligence/public/common/navigation/types.ts
@ -72,8 +75,8 @@ export enum SecurityPageName {
timelines = 'timelines',
timelinesTemplates = 'timelines-templates',
trustedApps = 'trusted_apps',
uncommonProcesses = 'uncommon_processes',
users = 'users',
usersAll = 'users-all',
usersAnomalies = 'users-anomalies',
usersAuthentications = 'users-authentications',
usersEvents = 'users-events',

View file

@ -26,20 +26,23 @@ export const getSolutionPageNameFromNavLinkId = (navLinkId: string): SolutionPag
// They are navLinks tree with a SecurityPageName, so they should be treated as leading breadcrumbs in ESS as well.
// TODO: Improve the breadcrumbs logic in `use_breadcrumbs_nav` to avoid this workaround.
const HIDDEN_BREADCRUMBS = new Set<SolutionPageName>([
SecurityPageName.networkFlows,
SecurityPageName.networkDns,
SecurityPageName.networkHttp,
SecurityPageName.networkTls,
SecurityPageName.networkAnomalies,
SecurityPageName.networkEvents,
SecurityPageName.usersAll,
SecurityPageName.usersAuthentications,
SecurityPageName.usersAnomalies,
SecurityPageName.usersRisk,
SecurityPageName.usersEvents,
SecurityPageName.uncommonProcesses,
SecurityPageName.hostsAll,
SecurityPageName.hostsUncommonProcesses,
SecurityPageName.hostsAnomalies,
SecurityPageName.hostsEvents,
SecurityPageName.hostsRisk,
SecurityPageName.sessions,
SecurityPageName.hostsSessions,
]);
export const isBreadcrumbHidden = (id: SolutionPageName): boolean =>

View file

@ -35,6 +35,13 @@ const networkLinks: LinkItem = {
}),
],
links: [
{
id: SecurityPageName.networkFlows,
title: i18n.translate('xpack.securitySolution.appLinks.network.flows', {
defaultMessage: 'Flows',
}),
path: `${NETWORK_PATH}/flows`,
},
{
id: SecurityPageName.networkDns,
title: i18n.translate('xpack.securitySolution.appLinks.network.dns', {
@ -89,6 +96,13 @@ const usersLinks: LinkItem = {
}),
],
links: [
{
id: SecurityPageName.usersAll,
title: i18n.translate('xpack.securitySolution.appLinks.users.allUsers', {
defaultMessage: 'All users',
}),
path: `${USERS_PATH}/allUsers`,
},
{
id: SecurityPageName.usersAuthentications,
title: i18n.translate('xpack.securitySolution.appLinks.users.authentications', {
@ -136,7 +150,15 @@ const hostsLinks: LinkItem = {
],
links: [
{
id: SecurityPageName.uncommonProcesses,
id: SecurityPageName.hostsAll,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.allHosts', {
defaultMessage: 'All hosts',
}),
path: `${HOSTS_PATH}/allHosts`,
isBeta: false,
},
{
id: SecurityPageName.hostsUncommonProcesses,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.uncommonProcesses', {
defaultMessage: 'Uncommon Processes',
}),
@ -165,7 +187,7 @@ const hostsLinks: LinkItem = {
path: `${HOSTS_PATH}/hostRisk`,
},
{
id: SecurityPageName.sessions,
id: SecurityPageName.hostsSessions,
title: i18n.translate('xpack.securitySolution.appLinks.hosts.sessions', {
defaultMessage: 'Sessions',
}),