-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary [Internal link](elastic/security-team#10820) to the feature details These changes add a functionality which enables related integrations functionality for migration rules: * related integration are shown in the migration rules table * user can navigate to the integration page to see instructions about installation process ### Other tasks and fixes * Default sorting in the table (by `Stats` => by `Author` => by `Severity` => by `Updated`) > [!NOTE] > This feature needs `siemMigrationsEnabled` experimental flag enabled to work. ## Screen recording <img width="1838" alt="Screenshot 2024-12-17 at 19 26 47" src="https://github.com/user-attachments/assets/c1ed9d5d-e237-4dfe-b144-a80adbf46cd3" /> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
aa64895
commit 019f0e8
Showing
28 changed files
with
425 additions
and
59 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
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
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
41 changes: 41 additions & 0 deletions
41
...ity_solution/public/siem_migrations/rules/components/rules_table_columns/integrations.tsx
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,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 { EuiLoadingSpinner } from '@elastic/eui'; | ||
import type { RelatedIntegration } from '../../../../../common/api/detection_engine'; | ||
import { IntegrationsPopover } from '../../../../detections/components/rules/related_integrations/integrations_popover'; | ||
import type { RuleMigration } from '../../../../../common/siem_migrations/model/rule_migration.gen'; | ||
import * as i18n from './translations'; | ||
import type { TableColumn } from './constants'; | ||
|
||
export const createIntegrationsColumn = ({ | ||
getMigrationRuleData, | ||
}: { | ||
getMigrationRuleData: ( | ||
ruleId: string | ||
) => { relatedIntegrations?: RelatedIntegration[]; isIntegrationsLoading?: boolean } | undefined; | ||
}): TableColumn => { | ||
return { | ||
field: 'elastic_rule.integration_id', | ||
name: i18n.COLUMN_INTEGRATIONS, | ||
render: (_, rule: RuleMigration) => { | ||
const migrationRuleData = getMigrationRuleData(rule.id); | ||
if (migrationRuleData?.isIntegrationsLoading) { | ||
return <EuiLoadingSpinner />; | ||
} | ||
const relatedIntegrations = migrationRuleData?.relatedIntegrations; | ||
if (relatedIntegrations == null || relatedIntegrations.length === 0) { | ||
return null; | ||
} | ||
return <IntegrationsPopover relatedIntegrations={relatedIntegrations} />; | ||
}, | ||
truncateText: true, | ||
width: '143px', | ||
align: 'center', | ||
}; | ||
}; |
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
Oops, something went wrong.