diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/__snapshots__/navigation_tree.test.ts.snap b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/__snapshots__/navigation_tree.test.ts.snap new file mode 100644 index 0000000000000..7674cbad74311 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/__snapshots__/navigation_tree.test.ts.snap @@ -0,0 +1,1266 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`formatNavigationTree creates the navigation tree for serverless 1`] = ` +Object { + "body": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "discover:", + "link": "discover", + "title": "Discover", + }, + Object { + "children": Array [ + Object { + "id": "overview", + "link": "securitySolutionUI:overview", + "sideNavStatus": "hidden", + "title": "Overview", + }, + Object { + "id": "detection_response", + "link": "securitySolutionUI:detection_response", + "sideNavStatus": "hidden", + "title": "Detection & Response", + }, + Object { + "id": "cloud_security_posture-dashboard", + "link": "securitySolutionUI:cloud_security_posture-dashboard", + "sideNavStatus": "hidden", + "title": "Cloud Security Posture", + }, + Object { + "id": "cloud_security_posture-vulnerability_dashboard", + "link": "securitySolutionUI:cloud_security_posture-vulnerability_dashboard", + "sideNavStatus": "hidden", + "title": "Cloud Native Vulnerability Management", + }, + Object { + "id": "entity_analytics", + "link": "securitySolutionUI:entity_analytics", + "sideNavStatus": "hidden", + "title": "Entity Analytics", + }, + Object { + "id": "data_quality", + "link": "securitySolutionUI:data_quality", + "sideNavStatus": "hidden", + "title": "Data Quality", + }, + ], + "id": "dashboards", + "link": "securitySolutionUI:dashboards", + "renderAs": "panelOpener", + "title": "Dashboards", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "id": "rules-add", + "link": "securitySolutionUI:rules-add", + "title": "Add Rules", + }, + Object { + "id": "rules-create", + "link": "securitySolutionUI:rules-create", + "title": "Create new rule", + }, + ], + "id": "rules", + "link": "securitySolutionUI:rules", + "title": "Detection rules (SIEM)", + }, + Object { + "id": "cloud_security_posture-benchmarks", + "link": "securitySolutionUI:cloud_security_posture-benchmarks", + "title": "Benchmarks", + }, + Object { + "id": "exceptions", + "link": "securitySolutionUI:exceptions", + "title": "Shared exception lists", + }, + ], + "id": "category-management", + "title": "Management", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "coverage-overview", + "link": "securitySolutionUI:coverage-overview", + "title": "MITRE ATT&CK® Coverage", + }, + ], + "id": "category-discover", + "title": "Discover", + }, + ], + "id": "rules-landing", + "link": "securitySolutionUI:rules-landing", + "renderAs": "panelOpener", + "title": "Rules", + }, + Object { + "id": "alerts", + "link": "securitySolutionUI:alerts", + "title": "Alerts", + }, + Object { + "id": "attack_discovery", + "link": "securitySolutionUI:attack_discovery", + "title": "Attack discovery", + }, + Object { + "id": "cloud_security_posture-findings", + "link": "securitySolutionUI:cloud_security_posture-findings", + "title": "Findings", + }, + Object { + "children": Array [ + Object { + "id": "cases_create", + "link": "securitySolutionUI:cases_create", + "sideNavStatus": "hidden", + "title": "Create", + }, + Object { + "id": "cases_configure", + "link": "securitySolutionUI:cases_configure", + "sideNavStatus": "hidden", + "title": "Settings", + }, + ], + "id": "cases", + "link": "securitySolutionUI:cases", + "renderAs": "panelOpener", + "title": "Cases", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "id": "timelines-templates", + "link": "securitySolutionUI:timelines-templates", + "sideNavStatus": "hidden", + "title": "Templates", + }, + ], + "id": "timelines", + "link": "securitySolutionUI:timelines", + "title": "Timelines", + }, + Object { + "id": "notes", + "link": "securitySolutionUI:notes", + "title": "Notes", + }, + Object { + "id": "osquery:", + "link": "osquery", + "title": "Osquery", + }, + ], + "id": "investigations", + "link": "securitySolutionUI:investigations", + "renderAs": "panelOpener", + "title": "Investigations", + }, + Object { + "id": "threat_intelligence", + "link": "securitySolutionUI:threat_intelligence", + "title": "Intelligence", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-all", + "link": "securitySolutionUI:hosts-all", + "title": "All hosts", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-uncommon_processes", + "link": "securitySolutionUI:hosts-uncommon_processes", + "title": "Uncommon Processes", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-anomalies", + "link": "securitySolutionUI:hosts-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-events", + "link": "securitySolutionUI:hosts-events", + "title": "Events", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-risk", + "link": "securitySolutionUI:hosts-risk", + "title": "Host risk", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-sessions", + "link": "securitySolutionUI:hosts-sessions", + "title": "Sessions", + }, + ], + "id": "hosts", + "link": "securitySolutionUI:hosts", + "title": "Hosts", + }, + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "network-flows", + "link": "securitySolutionUI:network-flows", + "title": "Flows", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-dns", + "link": "securitySolutionUI:network-dns", + "title": "DNS", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-http", + "link": "securitySolutionUI:network-http", + "title": "HTTP", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-tls", + "link": "securitySolutionUI:network-tls", + "title": "TLS", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-anomalies", + "link": "securitySolutionUI:network-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-events", + "link": "securitySolutionUI:network-events", + "title": "Events", + }, + ], + "id": "network", + "link": "securitySolutionUI:network", + "title": "Network", + }, + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "users-all", + "link": "securitySolutionUI:users-all", + "title": "All users", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-authentications", + "link": "securitySolutionUI:users-authentications", + "title": "Authentications", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-anomalies", + "link": "securitySolutionUI:users-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-risk", + "link": "securitySolutionUI:users-risk", + "title": "User risk", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-events", + "link": "securitySolutionUI:users-events", + "title": "Events", + }, + ], + "id": "users", + "link": "securitySolutionUI:users", + "title": "Users", + }, + ], + "id": "explore", + "link": "securitySolutionUI:explore", + "renderAs": "panelOpener", + "title": "Explore", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "id": "fleet:agents", + "link": "fleet:agents", + "title": "Agents", + }, + Object { + "id": "fleet:policies", + "link": "fleet:policies", + "title": "Policies", + }, + Object { + "id": "fleet:enrollment_tokens", + "link": "fleet:enrollment_tokens", + "title": "Enrollment tokens", + }, + Object { + "id": "fleet:uninstall_tokens", + "link": "fleet:uninstall_tokens", + "title": "Uninstall tokens", + }, + Object { + "id": "fleet:data_streams", + "link": "fleet:data_streams", + "title": "Data streams", + }, + Object { + "id": "fleet:settings", + "link": "fleet:settings", + "title": "Settings", + }, + ], + "id": "fleet:", + "link": "fleet", + "title": "Fleet", + }, + Object { + "children": Array [ + Object { + "id": "policy", + "link": "securitySolutionUI:policy", + "title": "Policies", + }, + Object { + "id": "trusted_apps", + "link": "securitySolutionUI:trusted_apps", + "title": "Trusted applications", + }, + Object { + "id": "event_filters", + "link": "securitySolutionUI:event_filters", + "title": "Event filters", + }, + Object { + "id": "host_isolation_exceptions", + "link": "securitySolutionUI:host_isolation_exceptions", + "title": "Host isolation exceptions", + }, + Object { + "id": "blocklist", + "link": "securitySolutionUI:blocklist", + "title": "Blocklist", + }, + Object { + "id": "response_actions_history", + "link": "securitySolutionUI:response_actions_history", + "title": "Response actions history", + }, + ], + "id": "endpoints", + "link": "securitySolutionUI:endpoints", + "title": "Endpoints", + }, + ], + "id": "assets", + "link": "securitySolutionUI:assets", + "renderAs": "panelOpener", + "title": "Assets", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:overview", + "link": "ml:overview", + "title": "Overview", + }, + Object { + "id": "ml:notifications", + "link": "ml:notifications", + "title": "Notifications", + }, + Object { + "id": "ml:memoryUsage", + "link": "ml:memoryUsage", + "title": "Memory usage", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:anomalyDetection", + "link": "ml:anomalyDetection", + "title": "Jobs", + }, + Object { + "id": "ml:anomalyExplorer", + "link": "ml:anomalyExplorer", + "title": "Anomaly explorer", + }, + Object { + "id": "ml:singleMetricViewer", + "link": "ml:singleMetricViewer", + "title": "Single metric viewer", + }, + Object { + "id": "ml:suppliedConfigurations", + "link": "ml:suppliedConfigurations", + "title": "Supplied configurations", + }, + Object { + "id": "ml:settings", + "link": "ml:settings", + "title": "Settings", + }, + ], + "id": "category-anomaly_detection", + "title": "Anomaly detection", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:dataFrameAnalytics", + "link": "ml:dataFrameAnalytics", + "title": "Jobs", + }, + Object { + "id": "ml:resultExplorer", + "link": "ml:resultExplorer", + "title": "Result explorer", + }, + Object { + "id": "ml:analyticsMap", + "link": "ml:analyticsMap", + "title": "Analytics map", + }, + ], + "id": "category-data_frame analytics", + "title": "Data frame analytics", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:nodesOverview", + "link": "ml:nodesOverview", + "title": "Trained models", + }, + ], + "id": "category-model_management", + "title": "Model management", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:fileUpload", + "link": "ml:fileUpload", + "title": "File data visualizer", + }, + Object { + "id": "ml:indexDataVisualizer", + "link": "ml:indexDataVisualizer", + "title": "Data view data visualizer", + }, + Object { + "id": "ml:esqlDataVisualizer", + "link": "ml:esqlDataVisualizer", + "title": "ES|QL data visualizer", + }, + Object { + "id": "ml:dataDrift", + "link": "ml:dataDrift", + "title": "Data drift", + }, + ], + "id": "category-data_visualizer", + "title": "Data visualizer", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:logRateAnalysis", + "link": "ml:logRateAnalysis", + "title": "Log Rate Analysis", + }, + Object { + "id": "ml:logPatternAnalysis", + "link": "ml:logPatternAnalysis", + "title": "Log pattern analysis", + }, + Object { + "id": "ml:changePointDetections", + "link": "ml:changePointDetections", + "title": "Change point detection", + }, + ], + "id": "category-aiops_labs", + "title": "Aiops labs", + }, + ], + "id": "machine_learning-landing", + "link": "securitySolutionUI:machine_learning-landing", + "renderAs": "panelOpener", + "title": "Machine learning", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "entity_analytics-management", + "link": "securitySolutionUI:entity_analytics-management", + "sideNavStatus": "hidden", + "title": "Entity Risk Score", + }, + Object { + "id": "entity_analytics-entity_store_management", + "link": "securitySolutionUI:entity_analytics-entity_store_management", + "sideNavStatus": "hidden", + "title": "Entity Store", + }, + ], + "id": undefined, + }, + ], + "defaultIsCollapsed": false, + "icon": "logoSecurity", + "id": "security_solution_nav", + "isCollapsible": false, + "title": "Security", + "type": "navGroup", + }, + ], + "footer": Array [ + Object { + "icon": "launch", + "link": "securitySolutionUI:get_started", + "title": "Get started", + "type": "navItem", + }, + Object { + "icon": "editorCodeBlock", + "link": "dev_tools", + "title": "Developer tools", + "type": "navItem", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "link": "management", + "title": "Stack Management", + }, + Object { + "link": "integrations", + "title": "Integrations", + }, + ], + "icon": "gear", + "id": "category-management", + "title": "Management", + "type": "navGroup", + }, + ], +} +`; + +exports[`formatNavigationTree creates the navigation tree for stateful 1`] = ` +Object { + "body": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "discover:", + "link": "discover", + "title": "Discover", + }, + Object { + "children": Array [ + Object { + "id": "overview", + "link": "securitySolutionUI:overview", + "sideNavStatus": "hidden", + "title": "Overview", + }, + Object { + "id": "detection_response", + "link": "securitySolutionUI:detection_response", + "sideNavStatus": "hidden", + "title": "Detection & Response", + }, + Object { + "id": "cloud_security_posture-dashboard", + "link": "securitySolutionUI:cloud_security_posture-dashboard", + "sideNavStatus": "hidden", + "title": "Cloud Security Posture", + }, + Object { + "id": "cloud_security_posture-vulnerability_dashboard", + "link": "securitySolutionUI:cloud_security_posture-vulnerability_dashboard", + "sideNavStatus": "hidden", + "title": "Cloud Native Vulnerability Management", + }, + Object { + "id": "entity_analytics", + "link": "securitySolutionUI:entity_analytics", + "sideNavStatus": "hidden", + "title": "Entity Analytics", + }, + Object { + "id": "data_quality", + "link": "securitySolutionUI:data_quality", + "sideNavStatus": "hidden", + "title": "Data Quality", + }, + ], + "id": "dashboards", + "link": "securitySolutionUI:dashboards", + "renderAs": "panelOpener", + "title": "Dashboards", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "id": "rules-add", + "link": "securitySolutionUI:rules-add", + "title": "Add Rules", + }, + Object { + "id": "rules-create", + "link": "securitySolutionUI:rules-create", + "title": "Create new rule", + }, + ], + "id": "rules", + "link": "securitySolutionUI:rules", + "title": "Detection rules (SIEM)", + }, + Object { + "id": "cloud_security_posture-benchmarks", + "link": "securitySolutionUI:cloud_security_posture-benchmarks", + "title": "Benchmarks", + }, + Object { + "id": "exceptions", + "link": "securitySolutionUI:exceptions", + "title": "Shared exception lists", + }, + Object { + "id": "siem_migrations-rules", + "link": "securitySolutionUI:siem_migrations-rules", + "title": "SIEM Rule Migrations", + }, + ], + "id": "category-management", + "title": "Management", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "coverage-overview", + "link": "securitySolutionUI:coverage-overview", + "title": "MITRE ATT&CK® Coverage", + }, + ], + "id": "category-discover", + "title": "Discover", + }, + ], + "id": "rules-landing", + "link": "securitySolutionUI:rules-landing", + "renderAs": "panelOpener", + "title": "Rules", + }, + Object { + "id": "alerts", + "link": "securitySolutionUI:alerts", + "title": "Alerts", + }, + Object { + "id": "attack_discovery", + "link": "securitySolutionUI:attack_discovery", + "title": "Attack discovery", + }, + Object { + "id": "cloud_security_posture-findings", + "link": "securitySolutionUI:cloud_security_posture-findings", + "title": "Findings", + }, + Object { + "children": Array [ + Object { + "id": "cases_create", + "link": "securitySolutionUI:cases_create", + "sideNavStatus": "hidden", + "title": "Create", + }, + Object { + "id": "cases_configure", + "link": "securitySolutionUI:cases_configure", + "sideNavStatus": "hidden", + "title": "Settings", + }, + ], + "id": "cases", + "link": "securitySolutionUI:cases", + "renderAs": "panelOpener", + "title": "Cases", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "id": "timelines-templates", + "link": "securitySolutionUI:timelines-templates", + "sideNavStatus": "hidden", + "title": "Templates", + }, + ], + "id": "timelines", + "link": "securitySolutionUI:timelines", + "title": "Timelines", + }, + Object { + "id": "notes", + "link": "securitySolutionUI:notes", + "title": "Notes", + }, + Object { + "id": "osquery:", + "link": "osquery", + "title": "Osquery", + }, + ], + "id": "investigations", + "link": "securitySolutionUI:investigations", + "renderAs": "panelOpener", + "title": "Investigations", + }, + Object { + "id": "threat_intelligence", + "link": "securitySolutionUI:threat_intelligence", + "title": "Intelligence", + }, + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-all", + "link": "securitySolutionUI:hosts-all", + "title": "All hosts", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-uncommon_processes", + "link": "securitySolutionUI:hosts-uncommon_processes", + "title": "Uncommon Processes", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-anomalies", + "link": "securitySolutionUI:hosts-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-events", + "link": "securitySolutionUI:hosts-events", + "title": "Events", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-risk", + "link": "securitySolutionUI:hosts-risk", + "title": "Host risk", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "hosts-sessions", + "link": "securitySolutionUI:hosts-sessions", + "title": "Sessions", + }, + ], + "id": "hosts", + "link": "securitySolutionUI:hosts", + "title": "Hosts", + }, + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "network-flows", + "link": "securitySolutionUI:network-flows", + "title": "Flows", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-dns", + "link": "securitySolutionUI:network-dns", + "title": "DNS", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-http", + "link": "securitySolutionUI:network-http", + "title": "HTTP", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-tls", + "link": "securitySolutionUI:network-tls", + "title": "TLS", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-anomalies", + "link": "securitySolutionUI:network-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "network-events", + "link": "securitySolutionUI:network-events", + "title": "Events", + }, + ], + "id": "network", + "link": "securitySolutionUI:network", + "title": "Network", + }, + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "id": "users-all", + "link": "securitySolutionUI:users-all", + "title": "All users", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-authentications", + "link": "securitySolutionUI:users-authentications", + "title": "Authentications", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-anomalies", + "link": "securitySolutionUI:users-anomalies", + "title": "Anomalies", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-risk", + "link": "securitySolutionUI:users-risk", + "title": "User risk", + }, + Object { + "breadcrumbStatus": "hidden", + "id": "users-events", + "link": "securitySolutionUI:users-events", + "title": "Events", + }, + ], + "id": "users", + "link": "securitySolutionUI:users", + "title": "Users", + }, + ], + "id": "explore", + "link": "securitySolutionUI:explore", + "renderAs": "panelOpener", + "title": "Explore", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "children": Array [ + Object { + "id": "fleet:agents", + "link": "fleet:agents", + "title": "Agents", + }, + Object { + "id": "fleet:policies", + "link": "fleet:policies", + "title": "Policies", + }, + Object { + "id": "fleet:enrollment_tokens", + "link": "fleet:enrollment_tokens", + "title": "Enrollment tokens", + }, + Object { + "id": "fleet:uninstall_tokens", + "link": "fleet:uninstall_tokens", + "title": "Uninstall tokens", + }, + Object { + "id": "fleet:data_streams", + "link": "fleet:data_streams", + "title": "Data streams", + }, + Object { + "id": "fleet:settings", + "link": "fleet:settings", + "title": "Settings", + }, + ], + "id": "fleet:", + "link": "fleet", + "title": "Fleet", + }, + Object { + "children": Array [ + Object { + "id": "policy", + "link": "securitySolutionUI:policy", + "title": "Policies", + }, + Object { + "id": "trusted_apps", + "link": "securitySolutionUI:trusted_apps", + "title": "Trusted applications", + }, + Object { + "id": "event_filters", + "link": "securitySolutionUI:event_filters", + "title": "Event filters", + }, + Object { + "id": "host_isolation_exceptions", + "link": "securitySolutionUI:host_isolation_exceptions", + "title": "Host isolation exceptions", + }, + Object { + "id": "blocklist", + "link": "securitySolutionUI:blocklist", + "title": "Blocklist", + }, + Object { + "id": "response_actions_history", + "link": "securitySolutionUI:response_actions_history", + "title": "Response actions history", + }, + ], + "id": "endpoints", + "link": "securitySolutionUI:endpoints", + "title": "Endpoints", + }, + ], + "id": "assets", + "link": "securitySolutionUI:assets", + "renderAs": "panelOpener", + "title": "Assets", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "children": Array [ + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:overview", + "link": "ml:overview", + "title": "Overview", + }, + Object { + "id": "ml:notifications", + "link": "ml:notifications", + "title": "Notifications", + }, + Object { + "id": "ml:memoryUsage", + "link": "ml:memoryUsage", + "title": "Memory usage", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:anomalyDetection", + "link": "ml:anomalyDetection", + "title": "Jobs", + }, + Object { + "id": "ml:anomalyExplorer", + "link": "ml:anomalyExplorer", + "title": "Anomaly explorer", + }, + Object { + "id": "ml:singleMetricViewer", + "link": "ml:singleMetricViewer", + "title": "Single metric viewer", + }, + Object { + "id": "ml:suppliedConfigurations", + "link": "ml:suppliedConfigurations", + "title": "Supplied configurations", + }, + Object { + "id": "ml:settings", + "link": "ml:settings", + "title": "Settings", + }, + ], + "id": "category-anomaly_detection", + "title": "Anomaly detection", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:dataFrameAnalytics", + "link": "ml:dataFrameAnalytics", + "title": "Jobs", + }, + Object { + "id": "ml:resultExplorer", + "link": "ml:resultExplorer", + "title": "Result explorer", + }, + Object { + "id": "ml:analyticsMap", + "link": "ml:analyticsMap", + "title": "Analytics map", + }, + ], + "id": "category-data_frame analytics", + "title": "Data frame analytics", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:nodesOverview", + "link": "ml:nodesOverview", + "title": "Trained models", + }, + ], + "id": "category-model_management", + "title": "Model management", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:fileUpload", + "link": "ml:fileUpload", + "title": "File data visualizer", + }, + Object { + "id": "ml:indexDataVisualizer", + "link": "ml:indexDataVisualizer", + "title": "Data view data visualizer", + }, + Object { + "id": "ml:esqlDataVisualizer", + "link": "ml:esqlDataVisualizer", + "title": "ES|QL data visualizer", + }, + Object { + "id": "ml:dataDrift", + "link": "ml:dataDrift", + "title": "Data drift", + }, + ], + "id": "category-data_visualizer", + "title": "Data visualizer", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "ml:logRateAnalysis", + "link": "ml:logRateAnalysis", + "title": "Log Rate Analysis", + }, + Object { + "id": "ml:logPatternAnalysis", + "link": "ml:logPatternAnalysis", + "title": "Log pattern analysis", + }, + Object { + "id": "ml:changePointDetections", + "link": "ml:changePointDetections", + "title": "Change point detection", + }, + ], + "id": "category-aiops_labs", + "title": "Aiops labs", + }, + ], + "id": "machine_learning-landing", + "link": "securitySolutionUI:machine_learning-landing", + "renderAs": "panelOpener", + "title": "Machine learning", + }, + ], + "id": undefined, + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "id": "entity_analytics-management", + "link": "securitySolutionUI:entity_analytics-management", + "sideNavStatus": "hidden", + "title": "Entity Risk Score", + }, + Object { + "id": "entity_analytics-entity_store_management", + "link": "securitySolutionUI:entity_analytics-entity_store_management", + "sideNavStatus": "hidden", + "title": "Entity Store", + }, + ], + "id": undefined, + }, + ], + "defaultIsCollapsed": false, + "icon": "logoSecurity", + "id": "security_solution_nav", + "isCollapsible": false, + "title": "Security", + "type": "navGroup", + }, + ], + "footer": Array [ + Object { + "icon": "launch", + "link": "securitySolutionUI:get_started", + "title": "Get started", + "type": "navItem", + }, + Object { + "icon": "editorCodeBlock", + "link": "dev_tools", + "title": "Developer tools", + "type": "navItem", + }, + Object { + "breadcrumbStatus": "hidden", + "children": Array [ + Object { + "link": "management", + "title": "Stack Management", + }, + Object { + "link": "monitoring", + "title": "Stack Monitoring", + }, + Object { + "link": "integrations", + "title": "Integrations", + }, + ], + "icon": "gear", + "id": "category-management", + "title": "Management", + "type": "navGroup", + }, + ], +} +`; diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.test.ts b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.test.ts new file mode 100644 index 0000000000000..cc2d9b8e3b7c9 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.test.ts @@ -0,0 +1,1102 @@ +/* + * 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 type { SolutionLinkCategory, SolutionNavLink } from '../../common/links'; +import { formatNavigationTree } from './navigation_tree'; + +describe('formatNavigationTree', () => { + test('creates the navigation tree for stateful', () => { + const solutionNavLinks = [ + { + id: 'dashboards', + title: 'Dashboards', + skipUrlState: false, + links: [ + { + id: 'overview', + title: 'Overview', + description: + 'Summary of your security environment activity, including alerts, events, recent items, and a news feed!', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/87e5860cdcd749a7.png', + }, + { + id: 'detection_response', + title: 'Detection & Response', + description: + 'Information about your Alerts and Cases within the Security Solution, including Hosts and Users with Alerts.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/6ee57fbd46b6f258.png', + }, + { + id: 'cloud_security_posture-dashboard', + title: 'Cloud Security Posture', + description: 'An overview of findings across all CSP integrations.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/d6dc7207d7b53949.png', + }, + { + id: 'cloud_security_posture-vulnerability_dashboard', + title: 'Cloud Native Vulnerability Management', + description: + 'Cloud Native Vulnerability Management (CNVM) allows you to identify vulnerabilities in your cloud workloads.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/d40d1de2a50c69e9.png', + }, + { + id: 'entity_analytics', + title: 'Entity Analytics', + description: + 'Entity analytics, anomalies, and threats to narrow down the monitoring surface area.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/39655a2668786e83.png', + isBeta: false, + }, + { + id: 'data_quality', + title: 'Data Quality', + description: + 'Check index mappings and values for compatibility with the Elastic Common Schema (ECS)', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/83ddb143ca02889a.png', + }, + ], + }, + { id: 'alerts', title: 'Alerts' }, + { id: 'attack_discovery', title: 'Attack discovery' }, + { id: 'cloud_security_posture-findings', title: 'Findings' }, + { + id: 'cases', + title: 'Cases', + links: [ + { id: 'cases_create', title: 'Create', disabled: true }, + { id: 'cases_configure', title: 'Settings', disabled: true }, + ], + }, + { + id: 'threat_intelligence', + title: 'Intelligence', + description: + 'Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats.', + }, + { + id: 'explore', + title: 'Explore', + skipUrlState: true, + links: [ + { + id: 'hosts', + title: 'Hosts', + description: 'A comprehensive overview of all hosts and host-related security events.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/f0d892a24aca5c21.png', + links: [ + { id: 'hosts-all', title: 'All hosts', isBeta: false }, + { id: 'hosts-uncommon_processes', title: 'Uncommon Processes' }, + { id: 'hosts-anomalies', title: 'Anomalies' }, + { id: 'hosts-events', title: 'Events' }, + { id: 'hosts-risk', title: 'Host risk' }, + { id: 'hosts-sessions', title: 'Sessions', isBeta: false }, + ], + }, + { + id: 'network', + title: 'Network', + description: + 'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/9473122fa26519cd.png', + links: [ + { id: 'network-flows', title: 'Flows' }, + { id: 'network-dns', title: 'DNS' }, + { id: 'network-http', title: 'HTTP' }, + { id: 'network-tls', title: 'TLS' }, + { id: 'network-anomalies', title: 'Anomalies' }, + { id: 'network-events', title: 'Events' }, + ], + }, + { + id: 'users', + title: 'Users', + description: + 'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/fd3fbca6f8f1d5fa.png', + links: [ + { id: 'users-all', title: 'All users' }, + { id: 'users-authentications', title: 'Authentications' }, + { id: 'users-anomalies', title: 'Anomalies' }, + { id: 'users-risk', title: 'User risk' }, + { id: 'users-events', title: 'Events' }, + ], + }, + ], + }, + { + id: 'rules-landing', + title: 'Rules', + categories: [ + { + label: 'Management', + linkIds: [ + 'rules', + 'cloud_security_posture-benchmarks', + 'exceptions', + 'siem_migrations-rules', + ], + }, + { label: 'Discover', linkIds: ['coverage-overview'] }, + ], + skipUrlState: true, + links: [ + { + id: 'rules', + title: 'Detection rules (SIEM)', + description: 'Create and manage detection rules for threat detection and monitoring.', + links: [ + { id: 'rules-add', title: 'Add Rules', skipUrlState: true }, + { id: 'rules-create', title: 'Create new rule', skipUrlState: true }, + ], + }, + { + id: 'exceptions', + title: 'Shared exception lists', + description: + 'Create and manage shared exception lists to prevent the creation of unwanted alerts.', + skipUrlState: true, + }, + { + id: 'cloud_security_posture-benchmarks', + title: 'Benchmarks', + description: 'View benchmark rules for Cloud Security Posture management.', + }, + { + id: 'coverage-overview', + title: 'MITRE ATT&CK® Coverage', + description: 'Review and maintain your protections MITRE ATT&CK® coverage.', + }, + { + id: 'siem_migrations-rules', + title: 'SIEM Rule Migrations', + description: + 'Our generative AI powered SIEM migration tool automates some of the most time consuming migrations tasks and processed.', + skipUrlState: true, + isBeta: true, + betaOptions: { text: 'Technical Preview' }, + }, + ], + }, + { + id: 'get_started', + title: 'Get started', + sideNavIcon: 'launch', + isFooterLink: true, + skipUrlState: true, + }, + { + id: 'assets', + title: 'Assets', + skipUrlState: true, + links: [ + { + id: 'fleet:', + title: 'Fleet', + description: 'Centralized management for Elastic Agents', + links: [ + { id: 'fleet:agents', title: 'Agents' }, + { id: 'fleet:policies', title: 'Policies' }, + { id: 'fleet:enrollment_tokens', title: 'Enrollment tokens' }, + { id: 'fleet:uninstall_tokens', title: 'Uninstall tokens' }, + { id: 'fleet:data_streams', title: 'Data streams' }, + { id: 'fleet:settings', title: 'Settings' }, + ], + }, + { + id: 'endpoints', + title: 'Endpoints', + description: 'Hosts running Elastic Defend.', + skipUrlState: true, + links: [ + { + id: 'policy', + title: 'Policies', + description: + 'Use policies to customize endpoint and cloud workload protections and other configurations.', + skipUrlState: true, + }, + { + id: 'trusted_apps', + title: 'Trusted applications', + description: + 'Improve performance or alleviate conflicts with other applications running on your hosts.', + skipUrlState: true, + }, + { + id: 'event_filters', + title: 'Event filters', + description: + 'Exclude high volume or unwanted events being written into Elasticsearch.', + skipUrlState: true, + }, + { + id: 'host_isolation_exceptions', + title: 'Host isolation exceptions', + description: 'Allow isolated hosts to communicate with specific IPs.', + skipUrlState: true, + }, + { + id: 'blocklist', + title: 'Blocklist', + description: 'Exclude unwanted applications from running on your hosts.', + skipUrlState: true, + }, + { + id: 'response_actions_history', + title: 'Response actions history', + description: 'View the history of response actions performed on hosts.', + skipUrlState: true, + }, + ], + }, + ], + }, + { + id: 'entity_analytics-management', + title: 'Entity Risk Score', + description: "Monitor entities' risk scores, and track anomalies.", + disabled: true, + skipUrlState: true, + }, + { + id: 'entity_analytics-entity_store_management', + title: 'Entity Store', + description: 'Store data for entities observed in events.', + disabled: true, + skipUrlState: true, + }, + { + id: 'investigations', + title: 'Investigations', + skipUrlState: true, + links: [ + { + id: 'timelines', + title: 'Timelines', + description: 'Central place for timelines and timeline templates', + links: [{ id: 'timelines-templates', title: 'Templates', disabled: true }], + }, + { + id: 'notes', + title: 'Notes', + description: + 'Oversee, revise, and revisit the notes attached to alerts, events and Timelines.', + landingIcon: 'filebeatApp', + skipUrlState: true, + }, + { + id: 'osquery:', + title: 'Osquery', + description: + 'Deploy Osquery with Elastic Agent, then run and schedule queries in Kibana', + }, + ], + }, + { + id: 'machine_learning-landing', + title: 'Machine learning', + skipUrlState: true, + categories: [ + { type: 'separator', linkIds: ['ml:overview', 'ml:notifications', 'ml:memoryUsage'] }, + { + type: 'title', + label: 'Anomaly detection', + linkIds: [ + 'ml:anomalyDetection', + 'ml:anomalyExplorer', + 'ml:singleMetricViewer', + 'ml:suppliedConfigurations', + 'ml:settings', + ], + }, + { + type: 'title', + label: 'Data frame analytics', + linkIds: ['ml:dataFrameAnalytics', 'ml:resultExplorer', 'ml:analyticsMap'], + }, + { type: 'title', label: 'Model management', linkIds: ['ml:nodesOverview'] }, + { + type: 'title', + label: 'Data visualizer', + linkIds: [ + 'ml:fileUpload', + 'ml:indexDataVisualizer', + 'ml:esqlDataVisualizer', + 'ml:dataDrift', + ], + }, + { + type: 'title', + label: 'Aiops labs', + linkIds: ['ml:logRateAnalysis', 'ml:logPatternAnalysis', 'ml:changePointDetections'], + }, + ], + links: [ + { id: 'ml:overview', title: 'Overview', description: 'Overview page' }, + { id: 'ml:notifications', title: 'Notifications', description: 'Notifications page' }, + { id: 'ml:memoryUsage', title: 'Memory usage', description: 'Memory usage page' }, + { id: 'ml:anomalyDetection', title: 'Jobs', description: 'Jobs page' }, + { + id: 'ml:anomalyExplorer', + title: 'Anomaly explorer', + description: 'Anomaly explorer page', + }, + { + id: 'ml:singleMetricViewer', + title: 'Single metric viewer', + description: 'Single metric viewer page', + }, + { + id: 'ml:suppliedConfigurations', + title: 'Supplied configurations', + description: 'Supplied configurations page', + }, + { id: 'ml:settings', title: 'Settings', description: 'Settings page' }, + { id: 'ml:dataFrameAnalytics', title: 'Jobs', description: 'Jobs page' }, + { + id: 'ml:resultExplorer', + title: 'Result explorer', + description: 'Result explorer page', + }, + { id: 'ml:analyticsMap', title: 'Analytics map', description: 'Analytics map page' }, + { id: 'ml:nodesOverview', title: 'Trained models', description: 'Trained models page' }, + { + id: 'ml:fileUpload', + title: 'File data visualizer', + description: 'File data visualizer page', + }, + { + id: 'ml:indexDataVisualizer', + title: 'Data view data visualizer', + description: 'Data view data visualizer page', + }, + { + id: 'ml:esqlDataVisualizer', + title: 'ES|QL data visualizer', + landingIcon: 'sqlApp', + description: 'ES|QL data visualizer page', + }, + { id: 'ml:dataDrift', title: 'Data drift', description: 'Data drift' }, + { + id: 'ml:logRateAnalysis', + title: 'Log Rate Analysis', + description: 'Log Rate Analysis Page', + }, + { + id: 'ml:logPatternAnalysis', + title: 'Log pattern analysis', + description: 'Log pattern analysis page', + }, + { + id: 'ml:changePointDetections', + title: 'Change point detection', + description: 'Change point detection page', + }, + ], + }, + { id: 'discover:', title: 'Discover' }, + { + id: 'dev_tools:', + title: 'Developer tools', + sideNavIcon: 'editorCodeBlock', + isFooterLink: true, + }, + { id: 'management:', title: 'Stack Management', isFooterLink: true }, + { id: 'monitoring:', title: 'Stack Monitoring', isFooterLink: true }, + { id: 'integrations:/browse/security', title: 'Integrations', isFooterLink: true }, + { + id: 'maps:', + title: 'Maps', + description: + 'Analyze geospatial data and identify geo patterns in multiple layers and indices.', + landingIcon: 'graphApp', + disabled: true, + }, + { + id: 'visualize:', + title: 'Visualize library', + description: 'Manage visualization library. Create, edit, and share visualizations.', + landingIcon: 'visualizeApp', + disabled: true, + }, + ] as SolutionNavLink[]; + + const bodyCategories = [ + { type: 'separator', linkIds: ['discover:', 'dashboards'] }, + { + type: 'separator', + linkIds: [ + 'rules-landing', + 'alerts', + 'attack_discovery', + 'cloud_security_posture-findings', + 'cases', + ], + }, + { type: 'separator', linkIds: ['investigations', 'threat_intelligence', 'explore'] }, + { type: 'separator', linkIds: ['asset_inventory'] }, + { type: 'separator', linkIds: ['assets'] }, + { type: 'separator', linkIds: ['machine_learning-landing'] }, + { + type: 'separator', + linkIds: ['entity_analytics-management', 'entity_analytics-entity_store_management'], + }, + ] as SolutionLinkCategory[]; + + const footerCategories = [ + { type: 'separator', linkIds: ['get_started', 'dev_tools:'] }, + { + type: 'accordion', + label: 'Management', + iconType: 'gear', + linkIds: ['management:', 'monitoring:', 'integrations:/browse/security'], + }, + ] as SolutionLinkCategory[]; + + expect( + formatNavigationTree(solutionNavLinks, bodyCategories, footerCategories) + ).toMatchSnapshot(); + }); + + test('creates the navigation tree for serverless', () => { + const solutionNavLinks = [ + { + id: 'dashboards', + title: 'Dashboards', + skipUrlState: false, + links: [ + { + id: 'overview', + title: 'Overview', + description: + 'Summary of your security environment activity, including alerts, events, recent items, and a news feed!', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/87e5860cdcd749a7.png', + }, + { + id: 'detection_response', + title: 'Detection & Response', + description: + 'Information about your Alerts and Cases within the Security Solution, including Hosts and Users with Alerts.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/6ee57fbd46b6f258.png', + }, + { + id: 'cloud_security_posture-dashboard', + title: 'Cloud Security Posture', + description: 'An overview of findings across all CSP integrations.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/d6dc7207d7b53949.png', + }, + { + id: 'cloud_security_posture-vulnerability_dashboard', + title: 'Cloud Native Vulnerability Management', + description: + 'Cloud Native Vulnerability Management (CNVM) allows you to identify vulnerabilities in your cloud workloads.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/d40d1de2a50c69e9.png', + }, + { + id: 'entity_analytics', + title: 'Entity Analytics', + description: + 'Entity analytics, anomalies, and threats to narrow down the monitoring surface area.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/39655a2668786e83.png', + isBeta: false, + }, + { + id: 'data_quality', + title: 'Data Quality', + description: + 'Check index mappings and values for compatibility with the Elastic Common Schema (ECS)', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/83ddb143ca02889a.png', + }, + ], + }, + { + id: 'alerts', + title: 'Alerts', + }, + { + id: 'attack_discovery', + title: 'Attack discovery', + }, + { + id: 'cloud_security_posture-findings', + title: 'Findings', + }, + { + id: 'cases', + title: 'Cases', + links: [ + { + id: 'cases_create', + title: 'Create', + disabled: true, + }, + { + id: 'cases_configure', + title: 'Settings', + disabled: true, + }, + ], + }, + { + id: 'threat_intelligence', + title: 'Intelligence', + description: + 'Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats.', + }, + { + id: 'explore', + title: 'Explore', + skipUrlState: true, + links: [ + { + id: 'hosts', + title: 'Hosts', + description: 'A comprehensive overview of all hosts and host-related security events.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/f0d892a24aca5c21.png', + links: [ + { + id: 'hosts-all', + title: 'All hosts', + isBeta: false, + }, + { + id: 'hosts-uncommon_processes', + title: 'Uncommon Processes', + }, + { + id: 'hosts-anomalies', + title: 'Anomalies', + }, + { + id: 'hosts-events', + title: 'Events', + }, + { + id: 'hosts-risk', + title: 'Host risk', + }, + { + id: 'hosts-sessions', + title: 'Sessions', + isBeta: false, + }, + ], + }, + { + id: 'network', + title: 'Network', + description: + 'Provides key activity metrics in an interactive map as well as event tables that enable interaction with the Timeline.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/9473122fa26519cd.png', + links: [ + { + id: 'network-flows', + title: 'Flows', + }, + { + id: 'network-dns', + title: 'DNS', + }, + { + id: 'network-http', + title: 'HTTP', + }, + { + id: 'network-tls', + title: 'TLS', + }, + { + id: 'network-anomalies', + title: 'Anomalies', + }, + { + id: 'network-events', + title: 'Events', + }, + ], + }, + { + id: 'users', + title: 'Users', + description: + 'A comprehensive overview of user data that enables understanding of authentication and user behavior within your environment.', + landingImage: + '/XXXXXXXXXXXX/bundles/plugin/securitySolution/1.0.0/fd3fbca6f8f1d5fa.png', + links: [ + { + id: 'users-all', + title: 'All users', + }, + { + id: 'users-authentications', + title: 'Authentications', + }, + { + id: 'users-anomalies', + title: 'Anomalies', + }, + { + id: 'users-risk', + title: 'User risk', + }, + { + id: 'users-events', + title: 'Events', + }, + ], + }, + ], + }, + { + id: 'rules-landing', + title: 'Rules', + categories: [ + { + label: 'Management', + linkIds: [ + 'rules', + 'cloud_security_posture-benchmarks', + 'exceptions', + 'siem_migrations-rules', + ], + }, + { + label: 'Discover', + linkIds: ['coverage-overview'], + }, + ], + skipUrlState: true, + links: [ + { + id: 'rules', + title: 'Detection rules (SIEM)', + description: 'Create and manage detection rules for threat detection and monitoring.', + links: [ + { + id: 'rules-add', + title: 'Add Rules', + skipUrlState: true, + }, + { + id: 'rules-create', + title: 'Create new rule', + skipUrlState: true, + }, + ], + }, + { + id: 'exceptions', + title: 'Shared exception lists', + description: + 'Create and manage shared exception lists to prevent the creation of unwanted alerts.', + skipUrlState: true, + }, + { + id: 'cloud_security_posture-benchmarks', + title: 'Benchmarks', + description: 'View benchmark rules for Cloud Security Posture management.', + }, + { + id: 'coverage-overview', + title: 'MITRE ATT&CK® Coverage', + description: 'Review and maintain your protections MITRE ATT&CK® coverage.', + }, + ], + }, + { + id: 'get_started', + title: 'Get started', + sideNavIcon: 'launch', + isFooterLink: true, + skipUrlState: true, + }, + { + id: 'assets', + title: 'Assets', + skipUrlState: true, + links: [ + { + id: 'fleet:', + title: 'Fleet', + description: 'Centralized management for Elastic Agents', + links: [ + { + id: 'fleet:agents', + title: 'Agents', + }, + { + id: 'fleet:policies', + title: 'Policies', + }, + { + id: 'fleet:enrollment_tokens', + title: 'Enrollment tokens', + }, + { + id: 'fleet:uninstall_tokens', + title: 'Uninstall tokens', + }, + { + id: 'fleet:data_streams', + title: 'Data streams', + }, + { + id: 'fleet:settings', + title: 'Settings', + }, + ], + }, + { + id: 'endpoints', + title: 'Endpoints', + description: 'Hosts running Elastic Defend.', + skipUrlState: true, + links: [ + { + id: 'policy', + title: 'Policies', + description: + 'Use policies to customize endpoint and cloud workload protections and other configurations.', + skipUrlState: true, + }, + { + id: 'trusted_apps', + title: 'Trusted applications', + description: + 'Improve performance or alleviate conflicts with other applications running on your hosts.', + skipUrlState: true, + }, + { + id: 'event_filters', + title: 'Event filters', + description: + 'Exclude high volume or unwanted events being written into Elasticsearch.', + skipUrlState: true, + }, + { + id: 'host_isolation_exceptions', + title: 'Host isolation exceptions', + description: 'Allow isolated hosts to communicate with specific IPs.', + skipUrlState: true, + }, + { + id: 'blocklist', + title: 'Blocklist', + description: 'Exclude unwanted applications from running on your hosts.', + skipUrlState: true, + }, + { + id: 'response_actions_history', + title: 'Response actions history', + description: 'View the history of response actions performed on hosts.', + skipUrlState: true, + }, + ], + }, + ], + }, + { + id: 'entity_analytics-management', + title: 'Entity Risk Score', + description: "Monitor entities' risk scores, and track anomalies.", + disabled: true, + skipUrlState: true, + }, + { + id: 'entity_analytics-entity_store_management', + title: 'Entity Store', + description: 'Store data for entities observed in events.', + disabled: true, + skipUrlState: true, + }, + { + id: 'investigations', + title: 'Investigations', + skipUrlState: true, + links: [ + { + id: 'timelines', + title: 'Timelines', + description: 'Central place for timelines and timeline templates', + links: [ + { + id: 'timelines-templates', + title: 'Templates', + disabled: true, + }, + ], + }, + { + id: 'notes', + title: 'Notes', + description: + 'Oversee, revise, and revisit the notes attached to alerts, events and Timelines.', + landingIcon: 'filebeatApp', + skipUrlState: true, + }, + { + id: 'osquery:', + title: 'Osquery', + description: + 'Deploy Osquery with Elastic Agent, then run and schedule queries in Kibana', + }, + ], + }, + { + id: 'machine_learning-landing', + title: 'Machine learning', + skipUrlState: true, + categories: [ + { + type: 'separator', + linkIds: ['ml:overview', 'ml:notifications', 'ml:memoryUsage'], + }, + { + type: 'title', + label: 'Anomaly detection', + linkIds: [ + 'ml:anomalyDetection', + 'ml:anomalyExplorer', + 'ml:singleMetricViewer', + 'ml:suppliedConfigurations', + 'ml:settings', + ], + }, + { + type: 'title', + label: 'Data frame analytics', + linkIds: ['ml:dataFrameAnalytics', 'ml:resultExplorer', 'ml:analyticsMap'], + }, + { + type: 'title', + label: 'Model management', + linkIds: ['ml:nodesOverview'], + }, + { + type: 'title', + label: 'Data visualizer', + linkIds: [ + 'ml:fileUpload', + 'ml:indexDataVisualizer', + 'ml:esqlDataVisualizer', + 'ml:dataDrift', + ], + }, + { + type: 'title', + label: 'Aiops labs', + linkIds: ['ml:logRateAnalysis', 'ml:logPatternAnalysis', 'ml:changePointDetections'], + }, + ], + links: [ + { + id: 'ml:overview', + title: 'Overview', + description: 'Overview page', + }, + { + id: 'ml:notifications', + title: 'Notifications', + description: 'Notifications page', + }, + { + id: 'ml:memoryUsage', + title: 'Memory usage', + description: 'Memory usage page', + }, + { + id: 'ml:anomalyDetection', + title: 'Jobs', + description: 'Jobs page', + }, + { + id: 'ml:anomalyExplorer', + title: 'Anomaly explorer', + description: 'Anomaly explorer page', + }, + { + id: 'ml:singleMetricViewer', + title: 'Single metric viewer', + description: 'Single metric viewer page', + }, + { + id: 'ml:suppliedConfigurations', + title: 'Supplied configurations', + description: 'Supplied configurations page', + }, + { + id: 'ml:settings', + title: 'Settings', + description: 'Settings page', + }, + { + id: 'ml:dataFrameAnalytics', + title: 'Jobs', + description: 'Jobs page', + }, + { + id: 'ml:resultExplorer', + title: 'Result explorer', + description: 'Result explorer page', + }, + { + id: 'ml:analyticsMap', + title: 'Analytics map', + description: 'Analytics map page', + }, + { + id: 'ml:nodesOverview', + title: 'Trained models', + description: 'Trained models page', + }, + { + id: 'ml:fileUpload', + title: 'File data visualizer', + description: 'File data visualizer page', + }, + { + id: 'ml:indexDataVisualizer', + title: 'Data view data visualizer', + description: 'Data view data visualizer page', + }, + { + id: 'ml:esqlDataVisualizer', + title: 'ES|QL data visualizer', + landingIcon: 'sqlApp', + description: 'ES|QL data visualizer page', + }, + { + id: 'ml:dataDrift', + title: 'Data drift', + description: 'Data drift', + }, + { + id: 'ml:logRateAnalysis', + title: 'Log Rate Analysis', + description: 'Log Rate Analysis Page', + }, + { + id: 'ml:logPatternAnalysis', + title: 'Log pattern analysis', + description: 'Log pattern analysis page', + }, + { + id: 'ml:changePointDetections', + title: 'Change point detection', + description: 'Change point detection page', + }, + ], + }, + { + id: 'discover:', + title: 'Discover', + }, + { + id: 'dev_tools:', + title: 'Developer tools', + sideNavIcon: 'editorCodeBlock', + isFooterLink: true, + }, + { + id: 'management:', + title: 'Stack Management', + isFooterLink: true, + }, + { + id: 'integrations:/browse/security', + title: 'Integrations', + isFooterLink: true, + }, + { + id: 'maps:', + title: 'Maps', + description: + 'Analyze geospatial data and identify geo patterns in multiple layers and indices.', + landingIcon: 'graphApp', + disabled: true, + }, + { + id: 'visualize:', + title: 'Visualize library', + description: 'Manage visualization library. Create, edit, and share visualizations.', + landingIcon: 'visualizeApp', + disabled: true, + }, + ] as SolutionNavLink[]; + + const bodyCategories = [ + { + type: 'separator', + linkIds: ['discover:', 'dashboards'], + }, + { + type: 'separator', + linkIds: [ + 'rules-landing', + 'alerts', + 'attack_discovery', + 'cloud_security_posture-findings', + 'cases', + ], + }, + { + type: 'separator', + linkIds: ['investigations', 'threat_intelligence', 'explore'], + }, + { + type: 'separator', + linkIds: ['asset_inventory'], + }, + { + type: 'separator', + linkIds: ['assets'], + }, + { + type: 'separator', + linkIds: ['machine_learning-landing'], + }, + { + type: 'separator', + linkIds: ['entity_analytics-management', 'entity_analytics-entity_store_management'], + }, + ] as SolutionLinkCategory[]; + + const footerCategories = [ + { + type: 'separator', + linkIds: ['get_started', 'dev_tools:'], + }, + { + type: 'accordion', + label: 'Management', + iconType: 'gear', + linkIds: ['management:', 'monitoring:', 'integrations:/browse/security'], + }, + ] as SolutionLinkCategory[]; + + expect( + formatNavigationTree(solutionNavLinks, bodyCategories, footerCategories) + ).toMatchSnapshot(); + }); +}); diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.ts b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.ts index 7271328a7adfd..8a5efab539d18 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/navigation_tree.ts @@ -18,7 +18,11 @@ import { isAccordionLinkCategory, } from '@kbn/security-solution-navigation'; import type { SolutionPageName, SolutionLinkCategory, SolutionNavLink } from '../../common/links'; -import { getNavLinkIdFromSolutionPageName, isBreadcrumbHidden } from './util'; +import { + getNavLinkIdFromSolutionPageName, + isBreadcrumbHidden, + isSideNavStatusHidden, +} from './util'; import { SOLUTION_NAME } from '../../common/translations'; export const formatNavigationTree = ( @@ -28,7 +32,7 @@ export const formatNavigationTree = ( ): NavigationTreeDefinition => { const [footerNavItems, bodyNavItems] = partition('isFooterLink', solutionNavLinks); const bodyChildren = addMainLinksPanelOpenerProp( - formatNodesFromLinks(bodyNavItems, bodyCategories) + formatNodesFromLinks(bodyNavItems, bodyCategories, []) ); return { body: [ @@ -51,22 +55,24 @@ export const formatNavigationTree = ( const formatNodesFromLinks = ( solutionNavLinks: SolutionNavLink[], - parentCategories?: Readonly>> + parentCategories: Readonly>>, + ids: SolutionPageName[] ): NodeDefinition[] => { const nodes: NodeDefinition[] = []; if (parentCategories?.length) { parentCategories.forEach((category) => { - nodes.push(...formatNodesFromLinksWithCategory(solutionNavLinks, category)); + nodes.push(...formatNodesFromLinksWithCategory(solutionNavLinks, category, ids)); }, []); } else { - nodes.push(...formatNodesFromLinksWithoutCategory(solutionNavLinks)); + nodes.push(...formatNodesFromLinksWithoutCategory(solutionNavLinks, ids)); } return nodes; }; const formatNodesFromLinksWithCategory = ( solutionNavLinks: SolutionNavLink[], - category: LinkCategory + category: LinkCategory, + ids: SolutionPageName[] ): NodeDefinition[] => { if (!category?.linkIds) { return []; @@ -76,7 +82,7 @@ const formatNodesFromLinksWithCategory = ( const children = category.linkIds.reduce((acc, linkId) => { const solutionNavLink = solutionNavLinks.find(({ id }) => id === linkId); if (solutionNavLink != null) { - acc.push(createNodeFromSolutionNavLink(solutionNavLink)); + acc.push(createNodeFromSolutionNavLink(solutionNavLink, ids)); } return acc; }, []); @@ -99,11 +105,18 @@ const formatNodesFromLinksWithCategory = ( }; const formatNodesFromLinksWithoutCategory = ( - solutionNavLinks: SolutionNavLink[] -): NodeDefinition[] => - solutionNavLinks.map((solutionNavLink) => createNodeFromSolutionNavLink(solutionNavLink)); + solutionNavLinks: SolutionNavLink[], + ids: SolutionPageName[] +): NodeDefinition[] => { + return solutionNavLinks.map((solutionNavLink) => + createNodeFromSolutionNavLink(solutionNavLink, ids) + ); +}; -const createNodeFromSolutionNavLink = (solutionNavLink: SolutionNavLink): NodeDefinition => { +const createNodeFromSolutionNavLink = ( + solutionNavLink: SolutionNavLink, + ids: SolutionPageName[] +): NodeDefinition => { const { id, title, links, categories, disabled } = solutionNavLink; const link = getNavLinkIdFromSolutionPageName(id); const node: NodeDefinition = { @@ -111,10 +124,10 @@ const createNodeFromSolutionNavLink = (solutionNavLink: SolutionNavLink): NodeDe link: link as AppDeepLinkId, title, ...(isBreadcrumbHidden(id) && { breadcrumbStatus: 'hidden' }), - ...(disabled && { sideNavStatus: 'hidden' }), + ...((isSideNavStatusHidden(ids) || disabled) && { sideNavStatus: 'hidden' }), }; if (links?.length) { - node.children = formatNodesFromLinks(links, categories); + node.children = formatNodesFromLinks(links, categories ?? [], ids.concat(id)); } return node; }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/solution_navigation.tsx b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/solution_navigation.tsx index cbdf5ec5d0a86..52b229e27c773 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/solution_navigation.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/solution_navigation.tsx @@ -70,8 +70,13 @@ export interface SolutionNavigation { export const getSolutionNavigation = (core: CoreStart): SolutionNavigation => { const panelContent = getPanelContent(core, navLinks$); const panelContentProvider: PanelContentProvider = (id: string) => { - // Stack Management uses the default panel content - if (!id.endsWith('.stack_management')) { + // Selected nav nodes use the custom panel content + if ( + id.endsWith('.rules-landing') || + id.endsWith('.investigations') || + id.endsWith('.explore') || + id.endsWith('.machine_learning-landing') + ) { return { content: panelContent }; } }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/util.ts b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/util.ts index e39bec065f48f..967d21037919a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/util.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/app/solution_navigation/util.ts @@ -49,3 +49,8 @@ export const isBreadcrumbHidden = (id: SolutionPageName): boolean => HIDDEN_BREADCRUMBS.has(id) || /* management sub-pages set their breadcrumbs themselves, the main Management breadcrumb is configured with our navigationTree definition */ (id.startsWith(ExternalPageName.management) && id !== ExternalPageName.management); + +export const isSideNavStatusHidden = (ids: SolutionPageName[]): boolean => { + // Dashboard nav children should not be visible. The Dashboard nav item should only navigate to a landing page + return ids[0] === SecurityPageName.dashboards; +}; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts index 2ea08ba56a85a..4272107562869 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts @@ -266,26 +266,6 @@ describe('Serverless side navigation links', { tags: '@serverless' }, () => { cy.url().should('include', DASHBOARDS_URL); }); - it('navigates to the Overview page', () => { - navigateFromHeaderTo(ServerlessHeaders.OVERVIEW, true); - cy.url().should('include', OVERVIEW_URL); - }); - - it('navigates to the Detection & Response page', () => { - navigateFromHeaderTo(ServerlessHeaders.DETECTION_RESPONSE, true); - cy.url().should('include', DETECTION_AND_RESPONSE_URL); - }); - - it('navigates to the Entity Analytics page', () => { - navigateFromHeaderTo(ServerlessHeaders.ENTITY_ANALYTICS, true); - cy.url().should('include', ENTITY_ANALYTICS_URL); - }); - - it('navigates to the CSP dashboard page', () => { - navigateFromHeaderTo(ServerlessHeaders.CSP_DASHBOARD, true); - cy.url().should('include', CSP_DASHBOARD_URL); - }); - it('navigates to the Rules landing page', () => { navigateFromHeaderTo(ServerlessHeaders.RULES_LANDING, true); cy.url().should('include', RULES_LANDING_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/serverless_security_header.ts b/x-pack/test/security_solution_cypress/cypress/screens/serverless_security_header.ts index bf3c04a90395f..4daf1756ae5cf 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/serverless_security_header.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/serverless_security_header.ts @@ -63,8 +63,8 @@ export const CSP_DASHBOARD = export const HOSTS = '[data-test-subj="solutionSideNavPanelLink-hosts"]'; -export const FLEET = '[data-test-subj="solutionSideNavPanelLink-fleet:"]'; -export const ENDPOINTS = '[data-test-subj="solutionSideNavPanelLink-endpoints"]'; +export const FLEET = '[data-test-subj="panelGroupTitleId-fleet:"]'; +export const ENDPOINTS = '[data-test-subj="panelGroupTitleId-endpoints"]'; export const POLICIES = '[data-test-subj="solutionSideNavPanelLink-policy"]';