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.
[Rules migration] Add possibility to navigate to a specific migration (…
…elastic#11264) (elastic#201597) ## Summary [Internal link](elastic/security-team#10820) to the feature details With these changes we: * allow user to navigate to a specific migration by its id * handle different possible states on migrations rules page: * `no migrations`: if there are no existing migrations we will redirect user to the landing page * `unknown selected migration`: if unknown migration id is specified in the URL, then "Unknown Migration" page will be shown * `no selected migration`: if user lands on the root "SIEM migrations rules" page, then most recent migration will be shown * `show existing migration`: selected migration will be shown ### Screenshots **Unknown migration** <img width="1312" alt="Screenshot 2024-11-25 at 14 46 56" src="https://github.com/user-attachments/assets/45f51489-e4f8-496f-86e6-d19130bd6769"> **Show existing migration** <img width="1312" alt="Screenshot 2024-11-25 at 15 03 53" src="https://github.com/user-attachments/assets/ca866432-5a61-44c7-8bec-7aa95ba73156">
- Loading branch information
Showing
6 changed files
with
154 additions
and
156 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
53 changes: 0 additions & 53 deletions
53
...plugins/security_solution/public/siem_migrations/rules/components/no_migrations/index.tsx
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...s/security_solution/public/siem_migrations/rules/components/no_migrations/translations.ts
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...ins/security_solution/public/siem_migrations/rules/components/unknown_migration/index.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,34 @@ | ||
/* | ||
* 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 { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; | ||
import * as i18n from './translations'; | ||
|
||
const UnknownMigrationComponent = () => { | ||
return ( | ||
<EuiFlexGroup | ||
alignItems="center" | ||
gutterSize="s" | ||
responsive={false} | ||
direction="column" | ||
wrap={true} | ||
> | ||
<EuiFlexItem grow={false}> | ||
<EuiEmptyPrompt | ||
title={<h2>{i18n.UNKNOWN_MIGRATION}</h2>} | ||
titleSize="s" | ||
body={i18n.UNKNOWN_MIGRATION_BODY} | ||
data-test-subj="noMigrationsAvailable" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
}; | ||
|
||
export const UnknownMigration = React.memo(UnknownMigrationComponent); | ||
UnknownMigration.displayName = 'UnknownMigration'; |
23 changes: 23 additions & 0 deletions
23
...curity_solution/public/siem_migrations/rules/components/unknown_migration/translations.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,23 @@ | ||
/* | ||
* 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'; | ||
|
||
export const UNKNOWN_MIGRATION = i18n.translate( | ||
'xpack.securitySolution.siemMigrations.rules.unknownMigrationTitle', | ||
{ | ||
defaultMessage: 'Unknown migration', | ||
} | ||
); | ||
|
||
export const UNKNOWN_MIGRATION_BODY = i18n.translate( | ||
'xpack.securitySolution.siemMigrations.rules.unknownMigrationBodyTitle', | ||
{ | ||
defaultMessage: | ||
'Selected migration does not exist. Please select one of the available migraitons', | ||
} | ||
); |
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