From 94118298758f5551c419141177255feea7c2fb46 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 20 Feb 2025 08:36:20 +1100 Subject: [PATCH] [8.x] [Security Solution] Enable visualization in flyout advanced setting (#211319) (#211843) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Enable visualization in flyout advanced setting (#211319)](https://github.com/elastic/kibana/pull/211319) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com> --- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - .../security_solution/server/ui_settings.ts | 5 ++- .../alerts/alert_table_action_column.cy.ts | 22 +++++++++++-- ...etails_left_panel_analyzer_graph_tab.cy.ts | 3 +- ..._details_left_panel_session_view_tab.cy.ts | 3 +- .../alerts/investigate_in_timeline.cy.ts | 31 ++++++++++++------- .../alert_details_right_panel_overview_tab.ts | 2 +- 9 files changed, 44 insertions(+), 25 deletions(-) diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index e8dccf2e96b39..e74e680a47ba4 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -42361,7 +42361,6 @@ "xpack.securitySolution.uiSettings.enableCcsWarningDescription": "
Active les avertissements de vérification des privilèges dans les règles relatives aux index CCS
", "xpack.securitySolution.uiSettings.enableNewsFeedDescription": "Active le fil d'actualités
", "xpack.securitySolution.uiSettings.enableNewsFeedLabel": "Fil d'actualités", - "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutDescription": "[version d'évaluation technique] Activez les visualisations (analyseur et visualiseur de session) dans le menu volant.", "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutLabel": "Activer les visualisations dans le menu volant", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzer": "Exclure les niveaux froids de l'analyseur", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzerDescription": "Lorsque cette option est activée, les niveaux \"cold\" et \"frozen\" sont ignorés dans les requêtes de l'analyseur
", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 47eb303c45dfd..e1bf3e185e3a6 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -42218,7 +42218,6 @@ "xpack.securitySolution.uiSettings.enableCcsWarningDescription": "CCSインデックスのルールで権限チェック警告を有効にします
", "xpack.securitySolution.uiSettings.enableNewsFeedDescription": "ニュースフィードを有効にします
", "xpack.securitySolution.uiSettings.enableNewsFeedLabel": "ニュースフィード", - "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutDescription": "[テクニカルプレビュー]フライアウトで視覚化(アナライザーとセッションビューアー)を有効にします。", "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutLabel": "フライアウトでビジュアライゼーションを有効化", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzer": "アナライザーでコールドティアとフローズンティアを除外", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzerDescription": "有効にすると、アナライザークエリーでコールドティアとフローズンティアがスキップされます
", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 2b6dd162b165e..1511470a68b17 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -42314,7 +42314,6 @@ "xpack.securitySolution.uiSettings.enableCcsWarningDescription": "在规则中为 CCS 索引启用权限检查警告
", "xpack.securitySolution.uiSettings.enableNewsFeedDescription": "启用新闻源
", "xpack.securitySolution.uiSettings.enableNewsFeedLabel": "新闻源", - "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutDescription": "[技术预览] 在浮出控件中启用可视化(分析器和会话查看器)。", "xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutLabel": "在浮出控件中启用可视化", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzer": "在分析器中排除冷层和冻结层", "xpack.securitySolution.uiSettings.excludeColdAndFrozenTiersInAnalyzerDescription": "启用后,将在分析器查询中跳过冷层和冻结层
", diff --git a/x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts b/x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts index 0ad792ca635d4..0f18575f59563 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/ui_settings.ts @@ -216,13 +216,12 @@ export const initUiSettings = ( }, [ENABLE_VISUALIZATIONS_IN_FLYOUT_SETTING]: { name: enableVisualizationsInFlyoutLabel, - value: false, + value: true, description: i18n.translate( 'xpack.securitySolution.uiSettings.enableVisualizationsInFlyoutDescription', { defaultMessage: - '[technical preview] Enable visualizations (analyzer and session viewer) in flyout.', - values: { em: (chunks) => `${chunks}` }, + 'Enable visualizations (analyzer and session viewer) in document details flyout.', } ), type: 'boolean', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts index eb09d68e7bc15..71aaa8cbdefc1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { OVERLAY_CONTAINER } from '../../../screens/alerts'; import { openAnalyzerForFirstAlertInTimeline, openSessionViewerFromAlertTable, @@ -14,6 +13,12 @@ import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; +import { DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB } from '../../../screens/expandable_flyout/alert_details_left_panel'; +import { DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_SESSION_VIEW_BUTTON } from '../../../screens/expandable_flyout/alert_details_left_panel_session_view_tab'; +import { + DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_BUTTON, + DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_CONTENT, +} from '../../../screens/expandable_flyout/alert_details_left_panel_analyzer_graph_tab'; describe('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, () => { before(() => { @@ -36,11 +41,22 @@ describe('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, () => it('should have session viewer button visible & open session viewer on click', () => { openSessionViewerFromAlertTable(); - cy.get(OVERLAY_CONTAINER).should('be.visible'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB) + .should('have.text', 'Visualize') + .and('have.class', 'euiTab-isSelected'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_SESSION_VIEW_BUTTON) + .should('have.text', 'Session View') + .and('have.class', 'euiButtonGroupButton-isSelected'); }); it('should have analyzer button visible & open analyzer on click', () => { openAnalyzerForFirstAlertInTimeline(); - cy.get(OVERLAY_CONTAINER).should('be.visible'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB) + .should('have.text', 'Visualize') + .and('have.class', 'euiTab-isSelected'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_BUTTON) + .should('have.text', 'Analyzer Graph') + .and('have.class', 'euiButtonGroupButton-isSelected'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_CONTENT).should('exist'); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts index bb273093c474d..472d1eb12e210 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts @@ -22,8 +22,7 @@ import { getNewRule } from '../../../../objects/rule'; import { ALERTS_URL } from '../../../../urls/navigation'; import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; -// TODO enable once the visualize tabs are back -describe.skip( +describe( 'Alert details expandable flyout left panel analyzer graph', { tags: ['@ess', '@skipInServerless'] }, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts index 80a8238af4470..ece8776f953fe 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts @@ -17,8 +17,7 @@ import { getNewRule } from '../../../../objects/rule'; import { ALERTS_URL } from '../../../../urls/navigation'; import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; -// TODO enable once the visualize tabs are back -describe.skip( +describe( 'Alert details expandable flyout left panel session view', { tags: ['@ess', '@serverless'] }, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts index b763260f4da3e..515a967b1d1ef 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts @@ -6,12 +6,7 @@ */ import { getNewRule } from '../../../objects/rule'; -import { - ANALYZER_GRAPH_TAB_BUTTON, - PROVIDER_BADGE, - QUERY_TAB_BUTTON, - TIMELINE_TITLE, -} from '../../../screens/timeline'; +import { PROVIDER_BADGE, QUERY_TAB_BUTTON, TIMELINE_TITLE } from '../../../screens/timeline'; import { closeTimeline } from '../../../tasks/timeline'; import { investigateFirstAlertInTimeline } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; @@ -22,7 +17,7 @@ import { ALERTS_URL } from '../../../urls/navigation'; import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; import { expandAlertAtIndexExpandableFlyout } from '../../../tasks/expandable_flyout/common'; import { - clickAnalyzerPreviewTitleToOpenTimeline, + clickAnalyzerPreviewTitle, toggleOverviewTabAboutSection, toggleOverviewTabInvestigationSection, toggleOverviewTabVisualizationsSection, @@ -33,6 +28,11 @@ import { selectTakeActionItem, } from '../../../tasks/expandable_flyout/alert_details_right_panel'; import { DOCUMENT_DETAILS_FLYOUT_FOOTER_INVESTIGATE_IN_TIMELINE } from '../../../screens/expandable_flyout/alert_details_right_panel'; +import { DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB } from '../../../screens/expandable_flyout/alert_details_left_panel'; +import { + DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_BUTTON, + DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_CONTENT, +} from '../../../screens/expandable_flyout/alert_details_left_panel_analyzer_graph_tab'; import { openTimelineFromPrevalenceTableCell, openPrevalenceTab, @@ -43,6 +43,7 @@ import { openTimelineFromRelatedBySession, openTimelineFromRelatedSourceEvent, } from '../../../tasks/expandable_flyout/alert_details_left_panel_correlations_tab'; +import { openInsightsTab } from '../../../tasks/expandable_flyout/alert_details_left_panel'; describe( 'Investigate in timeline', @@ -83,18 +84,25 @@ describe( cy.get(QUERY_TAB_BUTTON).should('have.class', 'euiTab-isSelected'); }); - it('should open a new timeline from analyzer graph preview', () => { + it('should navigate to analyzer graph tab', () => { toggleOverviewTabAboutSection(); toggleOverviewTabInvestigationSection(); toggleOverviewTabVisualizationsSection(); - clickAnalyzerPreviewTitleToOpenTimeline(); + clickAnalyzerPreviewTitle(); - cy.get(TIMELINE_TITLE).should('have.text', 'Untitled timeline'); - cy.get(ANALYZER_GRAPH_TAB_BUTTON).should('have.class', 'euiTab-isSelected'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB) + .should('have.text', 'Visualize') + .and('have.class', 'euiTab-isSelected'); + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_BUTTON) + .should('have.text', 'Analyzer Graph') + .and('have.class', 'euiButtonGroupButton-isSelected'); + + cy.get(DOCUMENT_DETAILS_FLYOUT_VISUALIZE_TAB_GRAPH_ANALYZER_CONTENT).should('exist'); }); it('should open a new timeline from the prevalence detail table', () => { expandDocumentDetailsExpandableFlyoutLeftSection(); + openInsightsTab(); openPrevalenceTab(); openTimelineFromPrevalenceTableCell(); @@ -104,6 +112,7 @@ describe( it('should open a new timeline from the correlations tab', () => { expandDocumentDetailsExpandableFlyoutLeftSection(); + openInsightsTab(); openCorrelationsTab(); openTimelineFromRelatedSourceEvent(); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout/alert_details_right_panel_overview_tab.ts b/x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout/alert_details_right_panel_overview_tab.ts index be9b29a842e0e..88758162e5204 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout/alert_details_right_panel_overview_tab.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout/alert_details_right_panel_overview_tab.ts @@ -130,6 +130,6 @@ export const navigateToResponseDetails = () => { /** * Click the Response button to open the response detail tab in the left section */ -export const clickAnalyzerPreviewTitleToOpenTimeline = () => { +export const clickAnalyzerPreviewTitle = () => { cy.get(DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_ANALYZER_PREVIEW_TITLE_LINK).click(); };