-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[SecuritySolution] New onboarding hub #218122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a76d10e
init soc onboarding
angorayc c2c0e09
update integration link and header
angorayc 162864b
types
angorayc 267f5ca
unit tests
angorayc 73ff223
Merge branch 'main' of github.com:elastic/kibana into issue-11776
angorayc 505242c
styling
angorayc 179f3d2
styling
angorayc 4cec709
update unit tests
angorayc 5a1ce5c
update knowledge source text
angorayc c47fe74
use external_detections
angorayc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
9 changes: 9 additions & 0 deletions
9
...y/plugins/security_solution/public/common/lib/integrations/components/__mocks__/index.tsx
This file contains hidden or 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,9 @@ | ||
| /* | ||
| * 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 from 'react'; | ||
|
|
||
| export const SecurityIntegrations = () => <div data-test-subj="securityIntegrations" />; |
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
...lution/public/common/lib/integrations/components/__mocks__/with_filtered_integrations.tsx
This file contains hidden or 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,9 @@ | ||
| /* | ||
| * 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 from 'react'; | ||
|
|
||
| export const WithFilteredIntegrations = () => <div data-test-subj="withFilteredIntegrations" />; |
41 changes: 41 additions & 0 deletions
41
...ns/security_solution/public/common/lib/integrations/components/available_integrations.tsx
This file contains hidden or 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,41 @@ | ||
| /* | ||
| * 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 { AvailablePackagesHookType } from '@kbn/fleet-plugin/public'; | ||
| import type { UseSelectedTabReturn } from '../hooks/use_selected_tab'; | ||
| import type { IntegrationCardMetadata, RenderChildrenType, TopCalloutRenderer } from '../types'; | ||
| import { useFilterCards } from '../hooks/use_filter_cards'; | ||
|
|
||
| export const AvailableIntegrationsComponent: React.FC<{ | ||
| useAvailablePackages: AvailablePackagesHookType; | ||
| renderChildren: RenderChildrenType; | ||
| prereleaseIntegrationsEnabled: boolean; | ||
| checkCompleteMetadata?: IntegrationCardMetadata; | ||
| selectedTabResult: UseSelectedTabReturn; | ||
| topCalloutRenderer?: TopCalloutRenderer; | ||
| }> = ({ | ||
| useAvailablePackages, | ||
| renderChildren, | ||
| prereleaseIntegrationsEnabled, | ||
| checkCompleteMetadata, | ||
| selectedTabResult, | ||
| topCalloutRenderer, | ||
| }) => { | ||
| const { availablePackagesResult, allowedIntegrations } = useFilterCards({ | ||
| featuredCardIds: selectedTabResult.selectedTab?.featuredCardIds, | ||
| useAvailablePackages, | ||
| prereleaseIntegrationsEnabled, | ||
| }); | ||
|
|
||
| return renderChildren({ | ||
|
semd marked this conversation as resolved.
|
||
| allowedIntegrations, | ||
| availablePackagesResult, | ||
| checkCompleteMetadata, | ||
| selectedTabResult, | ||
| topCalloutRenderer, | ||
| }); | ||
| }; | ||
33 changes: 33 additions & 0 deletions
33
...ns/security/plugins/security_solution/public/common/lib/integrations/components/index.tsx
This file contains hidden or 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,33 @@ | ||
| /* | ||
| * 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 from 'react'; | ||
| import { useSelectedTab } from '../hooks/use_selected_tab'; | ||
| import { INTEGRATION_TABS } from '../configs/integration_tabs_configs'; | ||
| import { IntegrationsCardGridTabs } from './integration_card_grid_tabs'; | ||
| import { WithFilteredIntegrations } from './with_filtered_integrations'; | ||
| import type { IntegrationCardMetadata, TopCalloutRenderer } from '../types'; | ||
| import { useIntegrationContext } from '../hooks/integration_context'; | ||
|
|
||
| export const SecurityIntegrations: React.FC<{ | ||
| checkCompleteMetadata?: IntegrationCardMetadata; | ||
| topCalloutRenderer?: TopCalloutRenderer; | ||
| }> = ({ checkCompleteMetadata, topCalloutRenderer }) => { | ||
| const { spaceId } = useIntegrationContext(); | ||
| const selectedTabResult = useSelectedTab({ | ||
| spaceId, | ||
| integrationTabs: INTEGRATION_TABS, | ||
| }); | ||
|
Comment on lines
+19
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't we do this in the |
||
| return ( | ||
| <WithFilteredIntegrations | ||
| renderChildren={IntegrationsCardGridTabs} | ||
| prereleaseIntegrationsEnabled={false} | ||
| selectedTabResult={selectedTabResult} | ||
| checkCompleteMetadata={checkCompleteMetadata} | ||
| topCalloutRenderer={topCalloutRenderer} | ||
| /> | ||
| ); | ||
| }; | ||
41 changes: 41 additions & 0 deletions
41
...ecurity_solution/public/common/lib/integrations/components/integration_card_grid_tabs.tsx
This file contains hidden or 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,41 @@ | ||
| /* | ||
| * 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 from 'react'; | ||
| import type { RenderChildrenType } from '../types'; | ||
| import { useIntegrationCardList } from '../hooks/use_integration_card_list'; | ||
| import { IntegrationsCardGridTabsComponent } from './integration_card_grid_tabs_component'; | ||
|
|
||
| export const DEFAULT_CHECK_COMPLETE_METADATA = { | ||
| installedIntegrationsCount: 0, | ||
| isAgentRequired: false, | ||
| }; | ||
|
|
||
| export const IntegrationsCardGridTabs: RenderChildrenType = ({ | ||
| topCalloutRenderer, | ||
| allowedIntegrations, | ||
| availablePackagesResult, | ||
| checkCompleteMetadata = DEFAULT_CHECK_COMPLETE_METADATA, | ||
| selectedTabResult, | ||
| }) => { | ||
| const list = useIntegrationCardList({ | ||
| integrationsList: allowedIntegrations, | ||
| featuredCardIds: selectedTabResult.selectedTab?.featuredCardIds, | ||
| }); | ||
|
|
||
| const { installedIntegrationsCount, isAgentRequired } = checkCompleteMetadata; | ||
|
|
||
| return ( | ||
| <IntegrationsCardGridTabsComponent | ||
| isAgentRequired={isAgentRequired} | ||
| installedIntegrationsCount={installedIntegrationsCount} | ||
| topCalloutRenderer={topCalloutRenderer} | ||
| integrationList={list} | ||
| availablePackagesResult={availablePackagesResult} | ||
| selectedTabResult={selectedTabResult} | ||
| /> | ||
| ); | ||
| }; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are just checking whether the user needs to be redirected to the configurations page or the regular integrations page.
Why are concepts like "SearchAILake" or
external_detectionsintroduced here? People coming here will need to know more information than is necessary. And this is also introducing coupling.Couldn't we just do:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angorayc