-
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.
[Rules migration] Add possibility to navigate to a specific migration (…
- Loading branch information
Showing
6 changed files
with
146 additions
and
23 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
34 changes: 34 additions & 0 deletions
34
...ecurity_solution/public/siem_migrations/rules/components/no_selected_migrations/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 NoSelectedMigrationsComponent = () => { | ||
return ( | ||
<EuiFlexGroup | ||
alignItems="center" | ||
gutterSize="s" | ||
responsive={false} | ||
direction="column" | ||
wrap={true} | ||
> | ||
<EuiFlexItem grow={false}> | ||
<EuiEmptyPrompt | ||
title={<h2>{i18n.NO_SELECTED_MIGRATIONS}</h2>} | ||
titleSize="s" | ||
body={i18n.NO_SELECTED_MIGRATIONS_BODY} | ||
data-test-subj="noMigrationsAvailable" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
}; | ||
|
||
export const NoSelectedMigrations = React.memo(NoSelectedMigrationsComponent); | ||
NoSelectedMigrations.displayName = 'NoSelectedMigrations'; |
22 changes: 22 additions & 0 deletions
22
...y_solution/public/siem_migrations/rules/components/no_selected_migrations/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,22 @@ | ||
/* | ||
* 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 NO_SELECTED_MIGRATIONS = i18n.translate( | ||
'xpack.securitySolution.siemMigrations.rules.noSelectedMigrationsTitle', | ||
{ | ||
defaultMessage: 'Select migration', | ||
} | ||
); | ||
|
||
export const NO_SELECTED_MIGRATIONS_BODY = i18n.translate( | ||
'xpack.securitySolution.siemMigrations.rules.noSelectedMigrationsBodyTitle', | ||
{ | ||
defaultMessage: 'There is no selected migration', | ||
} | ||
); |
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'; |
22 changes: 22 additions & 0 deletions
22
...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,22 @@ | ||
/* | ||
* 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 is unknown. 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