[SecuritySolution][Onboarding] Siem migration start card and flyout - Part 1 (#202886)

## Summary

Part of: https://github.com/elastic/security-team/issues/10667

Implementation of the Onboarding card to create migrations using the
flyout

> [!NOTE]  
> This feature needs `siemMigrationsEnabled` experimental flag enabled
to work. Otherwise only the default topic will be available and the
topic selector won't be displayed.

<img width="1547" alt="image"
src="https://github.com/user-attachments/assets/f43c60a0-0631-44d8-ba82-7f16971ecc24">

#### To do in part 2:
- Complete implementation of migration finished panel: chart and stats
- Improve implementation of migration ready panel: should only allow
open the flyout
- Implement missing steps in the flyout: Macros and Lookups

### Test 
Enable experimental flag
Use file:
[1733135547_1420.json](1733135547_1420.json)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Sergi Massaneda 2024-12-05 17:29:51 +01:00 committed by GitHub
parent 5c6c4f44d3
commit b5c119496a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 2201 additions and 394 deletions

View file

@ -32,7 +32,10 @@ import { CopyTimelineRequestBodyInput } from '@kbn/security-solution-plugin/comm
import { CreateAlertsMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration.gen';
import { CreateAssetCriticalityRecordRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/asset_criticality/create_asset_criticality.gen';
import { CreateRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/create_rule/create_rule_route.gen';
import { CreateRuleMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen';
import {
CreateRuleMigrationRequestParamsInput,
CreateRuleMigrationRequestBodyInput,
} from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen';
import { CreateTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/create_timelines/create_timelines_route.gen';
import {
CreateUpdateProtectionUpdatesNoteRequestParamsInput,
@ -374,7 +377,12 @@ If a record already exists for the specified entity, that record is overwritten
*/
createRuleMigration(props: CreateRuleMigrationProps, kibanaSpace: string = 'default') {
return supertest
.post(routeWithNamespace('/internal/siem_migrations/rules', kibanaSpace))
.post(
routeWithNamespace(
replaceParams('/internal/siem_migrations/rules/{migration_id}', props.params),
kibanaSpace
)
)
.set('kbn-xsrf', 'true')
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
@ -1595,6 +1603,7 @@ export interface CreateRuleProps {
body: CreateRuleRequestBodyInput;
}
export interface CreateRuleMigrationProps {
params: CreateRuleMigrationRequestParamsInput;
body: CreateRuleMigrationRequestBodyInput;
}
export interface CreateTimelinesProps {