forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Adding selector list component to onboarding cards (
elastic#199311) ## Summary This PR addresses [elastic#198761](elastic#198761), which enhance onboarding card layouts for better usability and engagement. The following updates have been implemented: - New Card Layouts: Applied to `alerts`, `dashboards`, and `rules` cards. Previously, each card displayed a description on the left and a static asset on the right. The updated design introduces a list of selectable items on the left side. Selecting an item updates the right-side content to display a corresponding video. - New Components: `OnboardingCardContentAssetPanel`: A reusable component designed to render children and display an asset, supporting both image and video types. `CardSelectorList`: A flexible component for rendering a list of selectable items provided to it, enabling the new card interaction behavior. - Persistent Selection: The current selection for each card is now saved in localStorage using keys specific to each card type (alerts, dashboards, and rules). This ensures the last selection is remembered, and when the card is expanded (on initial render or later), the component will automatically scroll to and highlight the saved selection. https://github.com/user-attachments/assets/ffc02c3c-625f-46ec-aff0-1bb1e9b73bb3 ### Checklist Delete any items that are not applicable to this PR. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@gmail.com>
- Loading branch information
1 parent
e0092ad
commit 0926703
Showing
42 changed files
with
1,044 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
..._solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card_config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* 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 { i18n } from '@kbn/i18n'; | ||
import alertTimelineImageSrc from './images/alert_timeline.png'; | ||
import sessionViewImageSrc from './images/session_view.png'; | ||
import alertListImageSrc from './images/alert_list.png'; | ||
import eventAnalyzerImageSrc from './images/event_analyzer.png'; | ||
import { AlertsCardItemId } from './types'; | ||
import type { CardSelectorAssetListItem } from '../types'; | ||
import { CardAssetType } from '../types'; | ||
|
||
export const ALERTS_CARD_ITEMS: CardSelectorAssetListItem[] = [ | ||
{ | ||
id: AlertsCardItemId.list, | ||
title: i18n.translate('xpack.securitySolution.onboarding.alertsCards.details.title', { | ||
defaultMessage: 'Alert list and details', | ||
}), | ||
description: i18n.translate( | ||
'xpack.securitySolution.onboarding.alertsCards.details.description', | ||
{ | ||
defaultMessage: 'Sort through alerts and drill down into its details', | ||
} | ||
), | ||
asset: { | ||
type: CardAssetType.image, | ||
source: alertListImageSrc, | ||
alt: i18n.translate('xpack.securitySolution.onboarding.alertsCards.details.description', { | ||
defaultMessage: 'Sort through alerts and drill down into its details', | ||
}), | ||
}, | ||
}, | ||
{ | ||
id: AlertsCardItemId.timeline, | ||
title: i18n.translate('xpack.securitySolution.onboarding.alertsCards.timeline.title', { | ||
defaultMessage: 'Investigate in Timeline', | ||
}), | ||
description: i18n.translate( | ||
'xpack.securitySolution.onboarding.alertsCards.timeline.description', | ||
{ | ||
defaultMessage: 'Streamline alert investigation with real-time visualization', | ||
} | ||
), | ||
asset: { | ||
type: CardAssetType.image, | ||
source: alertTimelineImageSrc, | ||
alt: i18n.translate('xpack.securitySolution.onboarding.alertsCards.timeline.description', { | ||
defaultMessage: 'Streamline alert investigation with real-time visualization', | ||
}), | ||
}, | ||
}, | ||
{ | ||
id: AlertsCardItemId.analyzer, | ||
title: i18n.translate('xpack.securitySolution.onboarding.alertsCards.analyzer.title', { | ||
defaultMessage: 'Investigate in Analyzer', | ||
}), | ||
description: i18n.translate( | ||
'xpack.securitySolution.onboarding.alertsCards.analyzer.description', | ||
{ | ||
defaultMessage: 'Simplify alert analysis by visualizing threat detection processes', | ||
} | ||
), | ||
asset: { | ||
type: CardAssetType.image, | ||
source: eventAnalyzerImageSrc, | ||
alt: i18n.translate('xpack.securitySolution.onboarding.alertsCards.analyzer.description', { | ||
defaultMessage: 'Simplify alert analysis by visualizing threat detection processes', | ||
}), | ||
}, | ||
}, | ||
{ | ||
id: AlertsCardItemId.sessionView, | ||
title: i18n.translate('xpack.securitySolution.onboarding.alertsCards.sessionView.title', { | ||
defaultMessage: 'Investigate in Session View', | ||
}), | ||
description: i18n.translate( | ||
'xpack.securitySolution.onboarding.alertsCards.sessionView.description', | ||
{ | ||
defaultMessage: 'Centralized threat analysis and response with real-time data insights', | ||
} | ||
), | ||
asset: { | ||
type: CardAssetType.image, | ||
source: sessionViewImageSrc, | ||
alt: i18n.translate('xpack.securitySolution.onboarding.alertsCards.sessionView.description', { | ||
defaultMessage: 'Centralized threat analysis and response with real-time data insights', | ||
}), | ||
}, | ||
}, | ||
]; | ||
|
||
export const ALERTS_CARD_ITEMS_BY_ID = Object.fromEntries( | ||
ALERTS_CARD_ITEMS.map((card) => [card.id, card]) | ||
); |
11 changes: 11 additions & 0 deletions
11
.../security_solution/public/onboarding/components/onboarding_body/cards/alerts/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* 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 { CardSelectorListItem } from '../common/card_selector_list'; | ||
import { ALERTS_CARD_ITEMS } from './alerts_card_config'; | ||
|
||
export const DEFAULT_ALERTS_CARD_ITEM_SELECTED: CardSelectorListItem = ALERTS_CARD_ITEMS[0]; |
Binary file added
BIN
+124 KB
...lic/onboarding/components/onboarding_body/cards/alerts/images/alert_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+326 KB
...public/onboarding/components/onboarding_body/cards/alerts/images/alert_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+234 KB
...ic/onboarding/components/onboarding_body/cards/alerts/images/alert_timeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+256 KB
...ic/onboarding/components/onboarding_body/cards/alerts/images/event_analyzer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+230 KB
...blic/onboarding/components/onboarding_body/cards/alerts/images/session_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...gins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export enum AlertsCardItemId { | ||
list = 'list', | ||
timeline = 'timeline', | ||
analyzer = 'analyzer', | ||
sessionView = 'session_view', | ||
} |
Oops, something went wrong.