From 5c3c8aff3ba3831da28def66ca095009916cd2a5 Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Mon, 12 Feb 2024 16:44:46 -0500 Subject: [PATCH 1/6] adds tour and tooltips --- .../security_solution/common/constants.ts | 2 +- .../tab_navigation/tab_navigation.tsx | 3 + .../navigation/tab_navigation/types.ts | 1 + .../common/components/navigation/types.ts | 1 + .../rules_table/rules_table_toolbar.tsx | 2 + .../translations.ts | 29 ++++ .../upgrade_prebuilt_rules_table_context.tsx | 20 ++- .../upgrade_prebuilt_rules_tour.tsx | 131 ++++++++++++++++++ .../pages/rule_management/index.tsx | 2 + 9 files changed, 187 insertions(+), 4 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index cf9e5ed8ba61f..0fcaab6ed9a3b 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -443,7 +443,7 @@ export const RULES_TABLE_MAX_PAGE_SIZE = 100; * we will need to update these constants with the corresponding version. */ export const NEW_FEATURES_TOUR_STORAGE_KEYS = { - RULE_MANAGEMENT_PAGE: 'securitySolution.rulesManagementPage.newFeaturesTour.v8.11', + RULE_MANAGEMENT_PAGE: 'securitySolution.rulesManagementPage.newFeaturesTour.v8.13', TIMELINES: 'securitySolution.security.timelineFlyoutHeader.saveTimelineTour', TIMELINE: 'securitySolution.timeline.newFeaturesTour.v8.12', }; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx index 996fdcd1bb176..3efdc20bae5f3 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx @@ -25,6 +25,7 @@ const TabNavigationItemComponent = ({ isSelected, isBeta, betaOptions, + tourAnchor, }: TabNavigationItemProps) => { const { getAppUrl, navigateTo } = useNavigation(); @@ -50,6 +51,7 @@ const TabNavigationItemComponent = ({ href={appHref} onClick={handleClick} append={isBeta && {betaOptions?.text ?? BETA}} + id={tourAnchor} > {name} @@ -96,6 +98,7 @@ export const TabNavigationComponent: React.FC = ({ navTabs } isSelected={isSelected} isBeta={tab.isBeta} betaOptions={tab.betaOptions} + tourAnchor={tab.tourAnchor} /> ); }), diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts index eda6b0c70caec..5fb6a7a7c4c31 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts @@ -21,4 +21,5 @@ export interface TabNavigationItemProps { betaOptions?: { text: string; }; + tourAnchor?: string; } diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts index 5091246fd451f..f04dfbd9dfbc9 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts @@ -42,4 +42,5 @@ export interface NavTab { betaOptions?: { text: string; }; + tourAnchor?: string; } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx index fb2c17ddb2fa1..691aeb812cd51 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx @@ -17,6 +17,7 @@ import { getPromptContextFromDetectionRules } from '../../../../assistant/helper import { useRulesTableContext } from './rules_table/rules_table_context'; import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; import * as i18nAssistant from '../../../../detections/pages/detection_engine/rules/translations'; +import { PER_FIELD_UPGRADE_TOUR_ANCHOR } from './upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour'; export enum AllRulesTabs { management = 'management', @@ -70,6 +71,7 @@ export const RulesTableToolbar = React.memo(() => { betaOptions: { text: `${updateTotal}`, }, + tourAnchor: PER_FIELD_UPGRADE_TOUR_ANCHOR, }, } : {}), diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts index 626c52a0173d8..c3c72fbbe718a 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts @@ -37,3 +37,32 @@ export const UPDATE_BUTTON_LABEL = i18n.translate( defaultMessage: 'Update', } ); + +export const UPDATE_TOUR_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourTitle', + { + defaultMessage: 'New field view of updates', + } +); + +export const UPDATE_TOUR_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourDescription', + { + defaultMessage: + 'You can now view the diff of updates in the flyout by clicking on the rule name.', + } +); + +export const UPDATE_FLYOUT_PER_FIELD_TOOLTIP_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.perFieldTooltip', + { + defaultMessage: 'View updates on a per field basis.', + } +); + +export const UPDATE_FLYOUT_JSON_VIEW_TOOLTIP_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.jsonViewTooltip', + { + defaultMessage: 'View the rule updates in JSON format.', + } +); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index d5a5938688925..ee3e438e1f37b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -7,7 +7,7 @@ import type { Dispatch, SetStateAction } from 'react'; import React, { createContext, useCallback, useContext, useMemo, useState } from 'react'; -import { EuiButton } from '@elastic/eui'; +import { EuiButton, EuiToolTip } from '@elastic/eui'; import type { EuiTabbedContentTab } from '@elastic/eui'; import { PerFieldRuleDiffTab } from '../../../../rule_management/components/rule_details/per_field_rule_diff_tab'; import { useIsUpgradingSecurityPackages } from '../../../../rule_management/logic/use_upgrade_security_packages'; @@ -284,7 +284,14 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ? [ { id: 'updates', - name: ruleDetailsI18n.UPDATES_TAB_LABEL, + name: ( + + <>{ruleDetailsI18n.UPDATES_TAB_LABEL} + + ), content: ( @@ -297,7 +304,14 @@ export const UpgradePrebuiltRulesTableContextProvider = ({ ? [ { id: 'jsonViewUpdates', - name: ruleDetailsI18n.JSON_VIEW_UPDATES_TAB_LABEL, + name: ( + + <>{ruleDetailsI18n.JSON_VIEW_UPDATES_TAB_LABEL} + + ), content: ( diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx new file mode 100644 index 0000000000000..bbd4122fe1142 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx @@ -0,0 +1,131 @@ +/* + * 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 { + EuiStatelessTourStep, + EuiTourActions, + EuiTourState, + EuiTourStepProps, +} from '@elastic/eui'; +import { + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiText, + EuiTourStep, + useEuiTour, +} from '@elastic/eui'; +import { noop } from 'lodash'; +import type { FC } from 'react'; +import React, { useEffect, useMemo } from 'react'; +import { NEW_FEATURES_TOUR_STORAGE_KEYS } from '../../../../../../common/constants'; +import { useKibana } from '../../../../../common/lib/kibana'; +import { useIsElementMounted } from '../rules_table/guided_onboarding/use_is_element_mounted'; +import * as i18n from './translations'; + +export interface RulesFeatureTourContextType { + steps: EuiTourStepProps[]; + actions: EuiTourActions; +} + +export const PER_FIELD_UPGRADE_TOUR_ANCHOR = 'perFieldUpgradeTour'; + +const TOUR_STORAGE_KEY = NEW_FEATURES_TOUR_STORAGE_KEYS.RULE_MANAGEMENT_PAGE; +const TOUR_POPOVER_WIDTH = 400; + +const tourConfig: EuiTourState = { + currentTourStep: 1, + isTourActive: true, + tourPopoverWidth: TOUR_POPOVER_WIDTH, + tourSubtitle: '', +}; + +const stepsConfig: EuiStatelessTourStep[] = [ + { + step: 1, + title: i18n.UPDATE_TOUR_TITLE, + content: {i18n.UPDATE_TOUR_DESCRIPTION}, + stepsTotal: 1, + children: <>, + onFinish: noop, + maxWidth: TOUR_POPOVER_WIDTH, + }, +]; + +export const PrebuiltRulesUpgradeTour: FC = () => { + const { storage } = useKibana().services; + + const restoredState = useMemo( + () => ({ + ...tourConfig, + ...storage.get(TOUR_STORAGE_KEY), + }), + [storage] + ); + + const [tourSteps, tourActions, tourState] = useEuiTour(stepsConfig, restoredState); + + useEffect(() => { + const { isTourActive, currentTourStep } = tourState; + storage.set(TOUR_STORAGE_KEY, { isTourActive, currentTourStep }); + }, [tourState, storage]); + + const shouldShowRuleUpgradeTour = useIsElementMounted(PER_FIELD_UPGRADE_TOUR_ANCHOR); + + const enhancedSteps = useMemo( + () => + tourSteps.map((item, index) => ({ + ...item, + content: ( + <> + {item.content} + {tourSteps.length > 1 && ( + <> + + + + + + + + + + + )} + + ), + })), + [tourSteps, tourActions] + ); + + return shouldShowRuleUpgradeTour ? ( + + ) : null; +}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx index 17c5368a4b1c5..020333ea804b4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx @@ -35,6 +35,7 @@ import { AllRules } from '../../components/rules_table'; import { RulesTableContextProvider } from '../../components/rules_table/rules_table/rules_table_context'; import { useInvalidateFetchCoverageOverviewQuery } from '../../../rule_management/api/hooks/use_fetch_coverage_overview_query'; import { HeaderPage } from '../../../../common/components/header_page'; +import { PrebuiltRulesUpgradeTour } from '../../components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour'; const RulesPageComponent: React.FC = () => { const [isImportModalVisible, showImportModal, hideImportModal] = useBoolState(); @@ -172,6 +173,7 @@ const RulesPageComponent: React.FC = () => { kibanaServices={kibanaServices} categories={[DEFAULT_APP_CATEGORIES.security.id]} /> + From be35f698d69dd1262869ec7197dfb466800cd32b Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Tue, 13 Feb 2024 11:01:16 -0500 Subject: [PATCH 2/6] addresses comments --- .../rule_details/rule_details_flyout.tsx | 3 ++ .../upgrade_prebuilt_rules_table_context.tsx | 2 + .../upgrade_prebuilt_rules_tour.tsx | 52 ++++--------------- 3 files changed, 14 insertions(+), 43 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx index c2d00c819253a..d6507115bcd48 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx @@ -109,6 +109,7 @@ interface RuleDetailsFlyoutProps { size?: EuiFlyoutProps['size']; extraTabs?: EuiTabbedContentTab[]; dataTestSubj?: string; + id?: string; closeFlyout: () => void; } @@ -118,6 +119,7 @@ export const RuleDetailsFlyout = ({ size = 'm', extraTabs = [], dataTestSubj, + id, closeFlyout, }: RuleDetailsFlyoutProps) => { const { expandedOverviewSections, toggleOverviewSection } = useOverviewTabSections(); @@ -181,6 +183,7 @@ export const RuleDetailsFlyout = ({ return ( { [storage] ); - const [tourSteps, tourActions, tourState] = useEuiTour(stepsConfig, restoredState); + const [tourSteps, , tourState] = useEuiTour(stepsConfig, restoredState); useEffect(() => { const { isTourActive, currentTourStep } = tourState; storage.set(TOUR_STORAGE_KEY, { isTourActive, currentTourStep }); }, [tourState, storage]); - const shouldShowRuleUpgradeTour = useIsElementMounted(PER_FIELD_UPGRADE_TOUR_ANCHOR); + const isTourAnchorMounted = useIsElementMounted(PER_FIELD_UPGRADE_TOUR_ANCHOR); + const isFlyoutOpen = useIsElementMounted(PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR); + const shouldShowRuleUpgradeTour = isTourAnchorMounted && !isFlyoutOpen; const enhancedSteps = useMemo( () => - tourSteps.map((item, index) => ({ + tourSteps.map((item) => ({ ...item, - content: ( - <> - {item.content} - {tourSteps.length > 1 && ( - <> - - - - - - - - - - - )} - - ), + content: item.content, })), - [tourSteps, tourActions] + [tourSteps] ); return shouldShowRuleUpgradeTour ? ( From a0a95874b2e4b3ce67979f875c06b944c9368c1d Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Tue, 13 Feb 2024 12:02:07 -0500 Subject: [PATCH 3/6] addresses comments --- .../tab_navigation/tab_navigation.tsx | 4 +- .../navigation/tab_navigation/types.ts | 1 - .../common/components/navigation/types.ts | 1 - .../rule_details/json_diff/translations.ts | 14 --- .../components/rule_details/rule_diff_tab.tsx | 4 +- .../feature_tour/rules_feature_tour.tsx | 43 +++----- .../rules_table/feature_tour/translations.ts | 12 +-- .../rules_table/rules_table_toolbar.tsx | 2 - .../translations.ts | 15 --- .../upgrade_prebuilt_rules_table_context.tsx | 2 +- .../upgrade_prebuilt_rules_tour.tsx | 97 ------------------- .../pages/rule_management/index.tsx | 8 +- 12 files changed, 29 insertions(+), 174 deletions(-) delete mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx index 3efdc20bae5f3..0f38ff32cfefa 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/tab_navigation.tsx @@ -25,7 +25,6 @@ const TabNavigationItemComponent = ({ isSelected, isBeta, betaOptions, - tourAnchor, }: TabNavigationItemProps) => { const { getAppUrl, navigateTo } = useNavigation(); @@ -51,7 +50,7 @@ const TabNavigationItemComponent = ({ href={appHref} onClick={handleClick} append={isBeta && {betaOptions?.text ?? BETA}} - id={tourAnchor} + id={id} > {name} @@ -98,7 +97,6 @@ export const TabNavigationComponent: React.FC = ({ navTabs } isSelected={isSelected} isBeta={tab.isBeta} betaOptions={tab.betaOptions} - tourAnchor={tab.tourAnchor} /> ); }), diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts index 5fb6a7a7c4c31..eda6b0c70caec 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts @@ -21,5 +21,4 @@ export interface TabNavigationItemProps { betaOptions?: { text: string; }; - tourAnchor?: string; } diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts index f04dfbd9dfbc9..5091246fd451f 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts @@ -42,5 +42,4 @@ export interface NavTab { betaOptions?: { text: string; }; - tourAnchor?: string; } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/translations.ts index b03c3f0a2085a..45aa87f1964f2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/json_diff/translations.ts @@ -17,20 +17,6 @@ export const EXPAND_UNCHANGED_LINES = (linesCount: number) => } ); -export const BASE_VERSION = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.upgradeRules.baseVersionLabel', - { - defaultMessage: 'Base version', - } -); - -export const BASE_VERSION_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.upgradeRules.baseVersionDescriptionLabel', - { - defaultMessage: 'Shows currently installed rule', - } -); - export const CURRENT_RULE_VERSION = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.upgradeRules.currentVersionLabel', { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx index d801f46e85696..52277d1cbad15 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_diff_tab.tsx @@ -150,13 +150,13 @@ export const RuleDiffTab = ({ oldRule, newRule }: RuleDiffTabProps) => { -
{i18n.BASE_VERSION}
+
{i18n.CURRENT_RULE_VERSION}
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx index d2f64ec882840..c12d254fc18d0 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx @@ -22,9 +22,10 @@ import { } from '@elastic/eui'; import { noop } from 'lodash'; import type { FC } from 'react'; -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { NEW_FEATURES_TOUR_STORAGE_KEYS } from '../../../../../../common/constants'; import { useKibana } from '../../../../../common/lib/kibana'; +import { useIsElementMounted } from '../rules_table/guided_onboarding/use_is_element_mounted'; import * as i18n from './translations'; export interface RulesFeatureTourContextType { @@ -32,7 +33,8 @@ export interface RulesFeatureTourContextType { actions: EuiTourActions; } -export const SEARCH_CAPABILITIES_TOUR_ANCHOR = 'search-capabilities-tour-anchor'; +export const PER_FIELD_UPGRADE_TOUR_ANCHOR = 'updates'; +export const PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR = 'updatePrebuiltRulePreview'; const TOUR_STORAGE_KEY = NEW_FEATURES_TOUR_STORAGE_KEYS.RULE_MANAGEMENT_PAGE; const TOUR_POPOVER_WIDTH = 400; @@ -41,14 +43,14 @@ const tourConfig: EuiTourState = { currentTourStep: 1, isTourActive: true, tourPopoverWidth: TOUR_POPOVER_WIDTH, - tourSubtitle: i18n.TOUR_TITLE, + tourSubtitle: '', }; const stepsConfig: EuiStatelessTourStep[] = [ { step: 1, - title: i18n.SEARCH_CAPABILITIES_TITLE, - content: {i18n.SEARCH_CAPABILITIES_DESCRIPTION}, + title: i18n.UPDATE_TOUR_TITLE, + content: {i18n.UPDATE_TOUR_DESCRIPTION}, stepsTotal: 1, children: <>, onFinish: noop, @@ -56,7 +58,7 @@ const stepsConfig: EuiStatelessTourStep[] = [ }, ]; -export const RulesFeatureTour: FC = () => { +export const RuleFeatureTour: FC = () => { const { storage } = useKibana().services; const restoredState = useMemo( @@ -74,28 +76,9 @@ export const RulesFeatureTour: FC = () => { storage.set(TOUR_STORAGE_KEY, { isTourActive, currentTourStep }); }, [tourState, storage]); - const [shouldShowSearchCapabilitiesTour, setShouldShowSearchCapabilitiesTour] = useState(false); - - useEffect(() => { - /** - * Wait until the tour target elements are visible on the page and mount - * EuiTourStep components only after that. Otherwise, the tours would never - * show up on the page. - */ - const observer = new MutationObserver(() => { - if (document.querySelector(`#${SEARCH_CAPABILITIES_TOUR_ANCHOR}`)) { - setShouldShowSearchCapabilitiesTour(true); - observer.disconnect(); - } - }); - - observer.observe(document.body, { - childList: true, - subtree: true, - }); - - return () => observer.disconnect(); - }, []); + const isTourAnchorMounted = useIsElementMounted(PER_FIELD_UPGRADE_TOUR_ANCHOR); + const isFlyoutOpen = useIsElementMounted(PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR); + const shouldShowRuleUpgradeTour = isTourAnchorMounted && !isFlyoutOpen; const enhancedSteps = useMemo( () => @@ -135,7 +118,7 @@ export const RulesFeatureTour: FC = () => { [tourSteps, tourActions] ); - return shouldShowSearchCapabilitiesTour ? ( + return shouldShowRuleUpgradeTour ? ( { */ // eslint-disable-next-line react/no-children-prop children={undefined} - anchor={`#${SEARCH_CAPABILITIES_TOUR_ANCHOR}`} + anchor={`#${PER_FIELD_UPGRADE_TOUR_ANCHOR}`} anchorPosition="downCenter" /> ) : null; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts index 45715c6ca76d8..6c7a3f6b37de6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts @@ -28,17 +28,17 @@ export const NEXT_STEP_LABEL = i18n.translate( } ); -export const SEARCH_CAPABILITIES_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesTitle', +export const UPDATE_TOUR_TITLE = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourTitle', { - defaultMessage: 'Enhanced search capabilities', + defaultMessage: 'New field view of updates', } ); -export const SEARCH_CAPABILITIES_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesDescription', +export const UPDATE_TOUR_DESCRIPTION = i18n.translate( + 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourDescription', { defaultMessage: - 'It is now possible to search rules by index patterns, like "filebeat-*", or by MITRE ATT&CK™ tactics or techniques, like "Defense Evasion" or "TA0005".', + 'You can now view the diff of updates in the flyout by clicking on the rule name.', } ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx index 691aeb812cd51..fb2c17ddb2fa1 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_toolbar.tsx @@ -17,7 +17,6 @@ import { getPromptContextFromDetectionRules } from '../../../../assistant/helper import { useRulesTableContext } from './rules_table/rules_table_context'; import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; import * as i18nAssistant from '../../../../detections/pages/detection_engine/rules/translations'; -import { PER_FIELD_UPGRADE_TOUR_ANCHOR } from './upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour'; export enum AllRulesTabs { management = 'management', @@ -71,7 +70,6 @@ export const RulesTableToolbar = React.memo(() => { betaOptions: { text: `${updateTotal}`, }, - tourAnchor: PER_FIELD_UPGRADE_TOUR_ANCHOR, }, } : {}), diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts index c3c72fbbe718a..264002464a03e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts @@ -38,21 +38,6 @@ export const UPDATE_BUTTON_LABEL = i18n.translate( } ); -export const UPDATE_TOUR_TITLE = i18n.translate( - 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourTitle', - { - defaultMessage: 'New field view of updates', - } -); - -export const UPDATE_TOUR_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourDescription', - { - defaultMessage: - 'You can now view the diff of updates in the flyout by clicking on the rule name.', - } -); - export const UPDATE_FLYOUT_PER_FIELD_TOOLTIP_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.perFieldTooltip', { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index dde8a74de1a93..925679c423e9f 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -35,7 +35,7 @@ import { MlJobUpgradeModal } from '../../../../../detections/components/modals/m import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations'; import * as i18n from './translations'; -import { PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR } from './upgrade_prebuilt_rules_tour'; +import { PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR } from '../feature_tour/rules_feature_tour'; export interface UpgradePrebuiltRulesTableState { /** diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx deleted file mode 100644 index cfb2d7bade30d..0000000000000 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour.tsx +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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 { - EuiStatelessTourStep, - EuiTourActions, - EuiTourState, - EuiTourStepProps, -} from '@elastic/eui'; -import { EuiText, EuiTourStep, useEuiTour } from '@elastic/eui'; -import { noop } from 'lodash'; -import type { FC } from 'react'; -import React, { useEffect, useMemo } from 'react'; -import { NEW_FEATURES_TOUR_STORAGE_KEYS } from '../../../../../../common/constants'; -import { useKibana } from '../../../../../common/lib/kibana'; -import { useIsElementMounted } from '../rules_table/guided_onboarding/use_is_element_mounted'; -import * as i18n from './translations'; - -export interface RulesFeatureTourContextType { - steps: EuiTourStepProps[]; - actions: EuiTourActions; -} - -export const PER_FIELD_UPGRADE_TOUR_ANCHOR = 'perFieldUpgradeTour'; -export const PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR = 'updatePrebuiltRulePreview'; - -const TOUR_STORAGE_KEY = NEW_FEATURES_TOUR_STORAGE_KEYS.RULE_MANAGEMENT_PAGE; -const TOUR_POPOVER_WIDTH = 400; - -const tourConfig: EuiTourState = { - currentTourStep: 1, - isTourActive: true, - tourPopoverWidth: TOUR_POPOVER_WIDTH, - tourSubtitle: '', -}; - -const stepsConfig: EuiStatelessTourStep[] = [ - { - step: 1, - title: i18n.UPDATE_TOUR_TITLE, - content: {i18n.UPDATE_TOUR_DESCRIPTION}, - stepsTotal: 1, - children: <>, - onFinish: noop, - maxWidth: TOUR_POPOVER_WIDTH, - }, -]; - -export const PrebuiltRulesUpgradeTour: FC = () => { - const { storage } = useKibana().services; - - const restoredState = useMemo( - () => ({ - ...tourConfig, - ...storage.get(TOUR_STORAGE_KEY), - }), - [storage] - ); - - const [tourSteps, , tourState] = useEuiTour(stepsConfig, restoredState); - - useEffect(() => { - const { isTourActive, currentTourStep } = tourState; - storage.set(TOUR_STORAGE_KEY, { isTourActive, currentTourStep }); - }, [tourState, storage]); - - const isTourAnchorMounted = useIsElementMounted(PER_FIELD_UPGRADE_TOUR_ANCHOR); - const isFlyoutOpen = useIsElementMounted(PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR); - const shouldShowRuleUpgradeTour = isTourAnchorMounted && !isFlyoutOpen; - - const enhancedSteps = useMemo( - () => - tourSteps.map((item) => ({ - ...item, - content: item.content, - })), - [tourSteps] - ); - - return shouldShowRuleUpgradeTour ? ( - - ) : null; -}; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx index 020333ea804b4..6567d3e2ee248 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/rule_management/index.tsx @@ -9,6 +9,7 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/ import { MaintenanceWindowCallout } from '@kbn/alerts-ui-shared'; import React, { useCallback } from 'react'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; +import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { APP_UI_ID } from '../../../../../common/constants'; import { SecurityPageName } from '../../../../app/types'; import { ImportDataModal } from '../../../../common/components/import_data_modal'; @@ -35,7 +36,7 @@ import { AllRules } from '../../components/rules_table'; import { RulesTableContextProvider } from '../../components/rules_table/rules_table/rules_table_context'; import { useInvalidateFetchCoverageOverviewQuery } from '../../../rule_management/api/hooks/use_fetch_coverage_overview_query'; import { HeaderPage } from '../../../../common/components/header_page'; -import { PrebuiltRulesUpgradeTour } from '../../components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_tour'; +import { RuleFeatureTour } from '../../components/rules_table/feature_tour/rules_feature_tour'; const RulesPageComponent: React.FC = () => { const [isImportModalVisible, showImportModal, hideImportModal] = useBoolState(); @@ -54,6 +55,9 @@ const RulesPageComponent: React.FC = () => { invalidateFetchRuleManagementFilters, invalidateFetchCoverageOverviewQuery, ]); + const isPerFieldPrebuiltRulesDiffingEnabled = useIsExperimentalFeatureEnabled( + 'perFieldPrebuiltRulesDiffingEnabled' + ); const [ { @@ -173,7 +177,7 @@ const RulesPageComponent: React.FC = () => { kibanaServices={kibanaServices} categories={[DEFAULT_APP_CATEGORIES.security.id]} /> - + {isPerFieldPrebuiltRulesDiffingEnabled && } From d13180e3b568d4dcd00ba7c6765ffb7872ad6393 Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Tue, 13 Feb 2024 12:21:10 -0500 Subject: [PATCH 4/6] fixes translations --- x-pack/plugins/translations/translations/fr-FR.json | 2 -- x-pack/plugins/translations/translations/ja-JP.json | 2 -- x-pack/plugins/translations/translations/zh-CN.json | 2 -- 3 files changed, 6 deletions(-) diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 2d22932853fa5..d30f381fde4f6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -33552,8 +33552,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.nextStepLabel": "Aller à l'étape suivante", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.previousStepLabel": "Revenir à l'étape précédente", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesDescription": "Il est maintenant possible de rechercher des règles par modèle d'indexation, tel que \"filebeat-*\", ou par tactique ou technique MITRE ATT&CK™, telle que \"Évasion par la défense \" ou \"TA0005\".", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesTitle": "Capacités de recherche améliorées", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.tourTitle": "Nouveautés", "xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle": "Règles personnalisées", "xpack.securitySolution.detectionEngine.rules.allRules.filters.disabledRulesTitle": "Règles désactivées", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index cdcd915ba92ab..f475d60191a49 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -33552,8 +33552,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.nextStepLabel": "次のステップに進む", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.previousStepLabel": "前のステップに戻る", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesDescription": "「filebeat-*」などのインデックスパターンや、「Defense Evasion」や「TA0005」などのMITRE ATT&CK™方式または手法でルールを検索できます。", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesTitle": "拡張検索機能", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.tourTitle": "新機能", "xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle": "カスタムルール", "xpack.securitySolution.detectionEngine.rules.allRules.filters.disabledRulesTitle": "無効なルール", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 1ce0f06025276..8692e143f9f05 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -33534,8 +33534,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.exportFilenameTitle": "rules_export", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.nextStepLabel": "前往下一步", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.previousStepLabel": "前往上一步", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesDescription": "现在可以按搜索模式(如“filebeat-*”) 或者 MITRE ATT&CK™ 策略或技术(如“Defense Evasion”或“TA0005”)搜索规则。", - "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.searchCapabilitiesTitle": "已增强搜索功能", "xpack.securitySolution.detectionEngine.rules.allRules.featureTour.tourTitle": "最新动态", "xpack.securitySolution.detectionEngine.rules.allRules.filters.customRulesTitle": "定制规则", "xpack.securitySolution.detectionEngine.rules.allRules.filters.disabledRulesTitle": "已禁用规则", From a1e4b4f9e106b2af8e8b817048b6d32f226aa1ff Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Tue, 13 Feb 2024 12:52:51 -0500 Subject: [PATCH 5/6] moves anchor export --- .../components/rules_table/feature_tour/rules_feature_tour.tsx | 2 +- .../upgrade_prebuilt_rules_table_context.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx index c12d254fc18d0..96e05f490147c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/rules_feature_tour.tsx @@ -26,6 +26,7 @@ import React, { useEffect, useMemo } from 'react'; import { NEW_FEATURES_TOUR_STORAGE_KEYS } from '../../../../../../common/constants'; import { useKibana } from '../../../../../common/lib/kibana'; import { useIsElementMounted } from '../rules_table/guided_onboarding/use_is_element_mounted'; +import { PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR } from '../upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context'; import * as i18n from './translations'; export interface RulesFeatureTourContextType { @@ -34,7 +35,6 @@ export interface RulesFeatureTourContextType { } export const PER_FIELD_UPGRADE_TOUR_ANCHOR = 'updates'; -export const PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR = 'updatePrebuiltRulePreview'; const TOUR_STORAGE_KEY = NEW_FEATURES_TOUR_STORAGE_KEYS.RULE_MANAGEMENT_PAGE; const TOUR_POPOVER_WIDTH = 400; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx index 925679c423e9f..0a938e0d10512 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/upgrade_prebuilt_rules_table_context.tsx @@ -35,7 +35,6 @@ import { MlJobUpgradeModal } from '../../../../../detections/components/modals/m import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import * as ruleDetailsI18n from '../../../../rule_management/components/rule_details/translations'; import * as i18n from './translations'; -import { PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR } from '../feature_tour/rules_feature_tour'; export interface UpgradePrebuiltRulesTableState { /** @@ -86,6 +85,8 @@ export interface UpgradePrebuiltRulesTableState { selectedRules: RuleUpgradeInfoForReview[]; } +export const PREBUILT_RULE_UPDATE_FLYOUT_ANCHOR = 'updatePrebuiltRulePreview'; + export interface UpgradePrebuiltRulesTableActions { reFetchRules: () => void; upgradeOneRule: (ruleId: string) => void; From 2531ccfd4f591b350c9d00cff8e374ba557d5520 Mon Sep 17 00:00:00 2001 From: Davis Plumlee Date: Tue, 13 Feb 2024 14:07:32 -0500 Subject: [PATCH 6/6] updates language --- .../components/rules_table/feature_tour/translations.ts | 3 +-- .../rules_table/upgrade_prebuilt_rules_table/translations.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts index 6c7a3f6b37de6..92fcae264b243 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/feature_tour/translations.ts @@ -38,7 +38,6 @@ export const UPDATE_TOUR_TITLE = i18n.translate( export const UPDATE_TOUR_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.updateTourDescription', { - defaultMessage: - 'You can now view the diff of updates in the flyout by clicking on the rule name.', + defaultMessage: "Click on a rule's name to view the latest changes.", } ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts index 264002464a03e..026c35f664bb3 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/translations.ts @@ -41,13 +41,13 @@ export const UPDATE_BUTTON_LABEL = i18n.translate( export const UPDATE_FLYOUT_PER_FIELD_TOOLTIP_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.perFieldTooltip', { - defaultMessage: 'View updates on a per field basis.', + defaultMessage: 'View changes field by field.', } ); export const UPDATE_FLYOUT_JSON_VIEW_TOOLTIP_DESCRIPTION = i18n.translate( 'xpack.securitySolution.detectionEngine.ruleDetails.jsonViewTooltip', { - defaultMessage: 'View the rule updates in JSON format.', + defaultMessage: 'View the latest rule changes in JSON format.', } );