Skip to content

Commit

Permalink
[8.x] [Security Solution] Onboarding redesign (#192247) (#195979)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Onboarding redesign
(#192247)](#192247)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-11T19:00:26Z","message":"[Security
Solution] Onboarding redesign (#192247)\n\n## Summary\r\n\r\nIssue:
#189487
PR is the final implementation of the Onboarding page
redesign.\r\n\r\nIt has been developed in collaboration with @angorayc
and\r\n@agusruidiazgd, using this branch as a feature branch.\r\nIt
already includes 2 smaller PRs that have already been reviewed
and\r\napproved by the @elastic/security-threat-hunting-explore
team:\r\n- https://github.com/semd/kibana/pull/8\r\n-
https://github.com/semd/kibana/pull/9\r\n\r\n### Changes\r\n- Onboarding
page architecture
refactor\r\n([issue](https://github.com/elastic/kibana/issues/174766))\r\n-
Fixes #183765 (from [this
Meta\r\nissue](https://github.com/elastic/kibana/issues/183760))\r\n\r\n---\r\n\r\n-
The progress bar has been removed\r\n<img width=\"903\" alt=\"progress
bar\"\r\nsrc=\"https://github.com/user-attachments/assets/f16f3b6d-609f-4178-b83e-3b2106ba56ea\">\r\n\r\n---\r\n\r\n-
Card styles updated:\r\n - Icons updated to custom SVGs to have the
correct color\r\n - Icon with circle background\r\n - Card internal
content border removed\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img
width=\"1172\" alt=\"Old
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/5a75cd84-a30d-4621-88e3-17d837165016\">|<img\r\nwidth=\"1172\"
alt=\"New
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/8059bcbc-2f3d-4c7e-ba4f-041a58b51372\">|\r\n\r\n---\r\n\r\n-
Completed card styles updated:\r\n - Icon with green circle
background\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img width=\"1172\"
alt=\"Old styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/3258c7be-4ffe-4d25-9cdb-d4fce66ce451\">|<img\r\nwidth=\"1172\"
alt=\"New styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/7dac6ec0-d78d-4881-ae84-3b46562c6d7d\">|\r\n\r\n---\r\n\r\n-
Improved \"Add data with integrations\" card\r\n\r\n| Old | New |\r\n| -
| - |\r\n|<img width=\"1174\" alt=\"old integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/3c65c4f5-004b-4619-aa92-26ec0656a8e5\">|<img\r\nwidth=\"1174\"
alt=\"new integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/634e5249-b169-4c93-865e-b82453db90bf\">|\r\n\r\n---\r\n\r\n-
New \"Configure AI assistant\" card in a new \"Discover Elastic AI\"
group\r\n\r\n\r\nhttps://github.com/user-attachments/assets/39bd0dd4-88ba-47df-a77b-6b9b2a185cef\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by: Agustina
Nahir Ruidiaz
<[email protected]>","sha":"d39c75a837e705637adc329887bc3b30ad90e79c","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","Team:
SecuritySolution","Team:Threat
Hunting:Explore","backport:prev-minor","ci:cloud-deploy","ci:cloud-persist-deployment","v8.16.0"],"title":"[Security
Solution] Onboarding
redesign","number":192247,"url":"https://github.com/elastic/kibana/pull/192247","mergeCommit":{"message":"[Security
Solution] Onboarding redesign (#192247)\n\n## Summary\r\n\r\nIssue:
#189487
PR is the final implementation of the Onboarding page
redesign.\r\n\r\nIt has been developed in collaboration with @angorayc
and\r\n@agusruidiazgd, using this branch as a feature branch.\r\nIt
already includes 2 smaller PRs that have already been reviewed
and\r\napproved by the @elastic/security-threat-hunting-explore
team:\r\n- https://github.com/semd/kibana/pull/8\r\n-
https://github.com/semd/kibana/pull/9\r\n\r\n### Changes\r\n- Onboarding
page architecture
refactor\r\n([issue](https://github.com/elastic/kibana/issues/174766))\r\n-
Fixes #183765 (from [this
Meta\r\nissue](https://github.com/elastic/kibana/issues/183760))\r\n\r\n---\r\n\r\n-
The progress bar has been removed\r\n<img width=\"903\" alt=\"progress
bar\"\r\nsrc=\"https://github.com/user-attachments/assets/f16f3b6d-609f-4178-b83e-3b2106ba56ea\">\r\n\r\n---\r\n\r\n-
Card styles updated:\r\n - Icons updated to custom SVGs to have the
correct color\r\n - Icon with circle background\r\n - Card internal
content border removed\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img
width=\"1172\" alt=\"Old
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/5a75cd84-a30d-4621-88e3-17d837165016\">|<img\r\nwidth=\"1172\"
alt=\"New
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/8059bcbc-2f3d-4c7e-ba4f-041a58b51372\">|\r\n\r\n---\r\n\r\n-
Completed card styles updated:\r\n - Icon with green circle
background\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img width=\"1172\"
alt=\"Old styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/3258c7be-4ffe-4d25-9cdb-d4fce66ce451\">|<img\r\nwidth=\"1172\"
alt=\"New styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/7dac6ec0-d78d-4881-ae84-3b46562c6d7d\">|\r\n\r\n---\r\n\r\n-
Improved \"Add data with integrations\" card\r\n\r\n| Old | New |\r\n| -
| - |\r\n|<img width=\"1174\" alt=\"old integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/3c65c4f5-004b-4619-aa92-26ec0656a8e5\">|<img\r\nwidth=\"1174\"
alt=\"new integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/634e5249-b169-4c93-865e-b82453db90bf\">|\r\n\r\n---\r\n\r\n-
New \"Configure AI assistant\" card in a new \"Discover Elastic AI\"
group\r\n\r\n\r\nhttps://github.com/user-attachments/assets/39bd0dd4-88ba-47df-a77b-6b9b2a185cef\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by: Agustina
Nahir Ruidiaz
<[email protected]>","sha":"d39c75a837e705637adc329887bc3b30ad90e79c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192247","number":192247,"mergeCommit":{"message":"[Security
Solution] Onboarding redesign (#192247)\n\n## Summary\r\n\r\nIssue:
#189487
PR is the final implementation of the Onboarding page
redesign.\r\n\r\nIt has been developed in collaboration with @angorayc
and\r\n@agusruidiazgd, using this branch as a feature branch.\r\nIt
already includes 2 smaller PRs that have already been reviewed
and\r\napproved by the @elastic/security-threat-hunting-explore
team:\r\n- https://github.com/semd/kibana/pull/8\r\n-
https://github.com/semd/kibana/pull/9\r\n\r\n### Changes\r\n- Onboarding
page architecture
refactor\r\n([issue](https://github.com/elastic/kibana/issues/174766))\r\n-
Fixes #183765 (from [this
Meta\r\nissue](https://github.com/elastic/kibana/issues/183760))\r\n\r\n---\r\n\r\n-
The progress bar has been removed\r\n<img width=\"903\" alt=\"progress
bar\"\r\nsrc=\"https://github.com/user-attachments/assets/f16f3b6d-609f-4178-b83e-3b2106ba56ea\">\r\n\r\n---\r\n\r\n-
Card styles updated:\r\n - Icons updated to custom SVGs to have the
correct color\r\n - Icon with circle background\r\n - Card internal
content border removed\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img
width=\"1172\" alt=\"Old
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/5a75cd84-a30d-4621-88e3-17d837165016\">|<img\r\nwidth=\"1172\"
alt=\"New
styles\"\r\nsrc=\"https://github.com/user-attachments/assets/8059bcbc-2f3d-4c7e-ba4f-041a58b51372\">|\r\n\r\n---\r\n\r\n-
Completed card styles updated:\r\n - Icon with green circle
background\r\n\r\n| Old | New |\r\n| - | - |\r\n|<img width=\"1172\"
alt=\"Old styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/3258c7be-4ffe-4d25-9cdb-d4fce66ce451\">|<img\r\nwidth=\"1172\"
alt=\"New styles
complete\"\r\nsrc=\"https://github.com/user-attachments/assets/7dac6ec0-d78d-4881-ae84-3b46562c6d7d\">|\r\n\r\n---\r\n\r\n-
Improved \"Add data with integrations\" card\r\n\r\n| Old | New |\r\n| -
| - |\r\n|<img width=\"1174\" alt=\"old integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/3c65c4f5-004b-4619-aa92-26ec0656a8e5\">|<img\r\nwidth=\"1174\"
alt=\"new integrations
card\"\r\nsrc=\"https://github.com/user-attachments/assets/634e5249-b169-4c93-865e-b82453db90bf\">|\r\n\r\n---\r\n\r\n-
New \"Configure AI assistant\" card in a new \"Discover Elastic AI\"
group\r\n\r\n\r\nhttps://github.com/user-attachments/assets/39bd0dd4-88ba-47df-a77b-6b9b2a185cef\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Angela Chuang <[email protected]>\r\nCo-authored-by: Agustina
Nahir Ruidiaz
<[email protected]>","sha":"d39c75a837e705637adc329887bc3b30ad90e79c"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <[email protected]>
  • Loading branch information
kibanamachine and semd authored Oct 11, 2024
1 parent df830ee commit a75861e
Show file tree
Hide file tree
Showing 272 changed files with 5,949 additions and 8,476 deletions.
7 changes: 4 additions & 3 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export const APP_NAME = 'Security' as const;
export const APP_ICON = 'securityAnalyticsApp' as const;
export const APP_ICON_SOLUTION = 'logoSecurity' as const;
export const APP_PATH = `/app/security` as const;
export const ADD_DATA_PATH = `/app/integrations/browse/security`;
export const ADD_THREAT_INTELLIGENCE_DATA_PATH = `/app/integrations/browse/threat_intel`;
export const APP_INTEGRATIONS_PATH = `/app/integrations` as const;
export const ADD_DATA_PATH = `${APP_INTEGRATIONS_PATH}/browse/security`;
export const ADD_THREAT_INTELLIGENCE_DATA_PATH = `${APP_INTEGRATIONS_PATH}/browse/threat_intel`;
export const DEFAULT_BYTES_FORMAT = 'format:bytes:defaultPattern' as const;
export const DEFAULT_DATE_FORMAT = 'dateFormat' as const;
export const DEFAULT_DATE_FORMAT_TZ = 'dateFormat:tz' as const;
Expand Down Expand Up @@ -85,7 +86,7 @@ export const MANAGE_PATH = '/manage' as const;
export const TIMELINES_PATH = '/timelines' as const;
export const CASES_PATH = '/cases' as const;
export const OVERVIEW_PATH = '/overview' as const;
export const LANDING_PATH = '/get_started' as const;
export const ONBOARDING_PATH = '/get_started' as const;
export const DATA_QUALITY_PATH = '/data_quality' as const;
export const DETECTION_RESPONSE_PATH = '/detection_response' as const;
export const DETECTIONS_PATH = '/detections' as const;
Expand Down
9 changes: 7 additions & 2 deletions x-pack/plugins/security_solution/public/app/app_routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import type { RouteProps } from 'react-router-dom';
import { Redirect } from 'react-router-dom';
import { Routes, Route } from '@kbn/shared-ux-router';
import type { Capabilities } from '@kbn/core/public';
import { CASES_FEATURE_ID, CASES_PATH, LANDING_PATH, SERVER_APP_ID } from '../../common/constants';
import {
CASES_FEATURE_ID,
CASES_PATH,
ONBOARDING_PATH,
SERVER_APP_ID,
} from '../../common/constants';
import { NotFoundPage } from './404';
import type { StartServices } from '../types';

Expand All @@ -33,7 +38,7 @@ AppRoutes.displayName = 'AppRoutes';

export const RedirectRoute = React.memo<{ capabilities: Capabilities }>(({ capabilities }) => {
if (capabilities[SERVER_APP_ID].show === true) {
return <Redirect to={LANDING_PATH} />;
return <Redirect to={ONBOARDING_PATH} />;
}
if (capabilities[CASES_FEATURE_ID].read_cases === true) {
return <Redirect to={CASES_PATH} />;
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions x-pack/plugins/security_solution/public/app_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { links as timelinesLinks } from './timelines/links';
import { links as casesLinks } from './cases/links';
import { links as managementLinks, getManagementFilteredLinks } from './management/links';
import { exploreLinks } from './explore/links';
import { gettingStartedLinks } from './overview/links';
import { onboardingLinks } from './onboarding/links';
import { findingsLinks } from './cloud_security_posture/links';
import type { StartPlugins } from './types';
import { dashboardsLinks } from './dashboards/links';
Expand All @@ -34,7 +34,7 @@ export const appLinks: AppLinkItems = Object.freeze([
indicatorsLinks,
exploreLinks,
rulesLinks,
gettingStartedLinks,
onboardingLinks,
managementLinks,
notesLink,
]);
Expand All @@ -55,7 +55,7 @@ export const getFilteredLinks = async (
indicatorsLinks,
exploreLinks,
rulesLinks,
gettingStartedLinks,
onboardingLinks,
managementFilteredLinks,
notesLink,
]);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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 React, { useMemo } from 'react';
import { EuiLoadingSpinner, useEuiTheme, type EuiLoadingSpinnerProps } from '@elastic/eui';

interface CenteredLoadingSpinnerProps extends EuiLoadingSpinnerProps {
topOffset?: string;
}

export const CenteredLoadingSpinner = React.memo<CenteredLoadingSpinnerProps>(
({ topOffset, ...euiLoadingSpinnerProps }) => {
const { euiTheme } = useEuiTheme();
const style = useMemo(
() => ({
display: 'flex',
margin: `${euiTheme.size.xl} auto`,
...(topOffset && { marginTop: topOffset }),
}),
[topOffset, euiTheme]
);

return <EuiLoadingSpinner {...euiLoadingSpinnerProps} style={style} />;
}
);
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* 2.0.
*/

export const useProjectFeaturesUrl = jest.fn(() => 'mocked_user_name');
export { CenteredLoadingSpinner } from './centered_loading_spinner';
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { fireEvent, render } from '@testing-library/react';
import { EmptyPromptComponent } from './empty_prompt';
import { SecurityPageName } from '../../../../common';
import { useNavigateTo } from '../../lib/kibana';
import { AddIntegrationsSteps } from '../landing_page/onboarding/types';
import { OnboardingCardId } from '../../../onboarding/constants';

const mockNavigateTo = jest.fn();
const mockUseNavigateTo = useNavigateTo as jest.Mock;
Expand All @@ -37,7 +37,7 @@ describe('EmptyPromptComponent component', () => {
fireEvent.click(link);
expect(mockNavigateTo).toBeCalledWith({
deepLinkId: SecurityPageName.landing,
path: `#${AddIntegrationsSteps.connectToDataSources}`,
path: `#${OnboardingCardId.integrations}`,
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import {
type EuiThemeComputed,
} from '@elastic/eui';
import { css } from '@emotion/react';
import { OnboardingCardId } from '../../../onboarding/constants';
import { SecurityPageName } from '../../../../common';

import * as i18n from './translations';
import endpointSvg from './images/endpoint1.svg';
import cloudSvg from './images/cloud1.svg';
import siemSvg from './images/siem1.svg';
import { useNavigateTo } from '../../lib/kibana';
import { VIDEO_SOURCE } from './constants';
import { AddIntegrationsSteps } from '../landing_page/onboarding/types';
import { ONBOARDING_VIDEO_SOURCE } from '../../constants';

const imgUrls = {
cloud: cloudSvg,
Expand Down Expand Up @@ -75,7 +75,7 @@ export const EmptyPromptComponent = memo(() => {
const navigateToAddIntegrations = useCallback(() => {
navigateTo({
deepLinkId: SecurityPageName.landing,
path: `#${AddIntegrationsSteps.connectToDataSources}`,
path: `#${OnboardingCardId.integrations}`,
});
}, [navigateTo]);

Expand Down Expand Up @@ -115,7 +115,7 @@ export const EmptyPromptComponent = memo(() => {
referrerPolicy="no-referrer"
sandbox="allow-scripts allow-same-origin"
scrolling="no"
src={VIDEO_SOURCE}
src={ONBOARDING_VIDEO_SOURCE}
title={i18n.SIEM_HEADER}
width="100%"
/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a75861e

Please sign in to comment.