-
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
…208491) # Backport This will backport the following commits from `main` to `8.x`: - [Add a warning callout when deleting managed assets (#207329)](#207329) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ignacio Rivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-28T08:46:58Z","message":"Add a warning callout when deleting managed assets (#207329)","sha":"c8bd387668ed3e6fe0fd71ec9cfbc5be58bbfc5c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","Feature:Ingest Node Pipelines","backport:prev-minor"],"title":"Add a warning callout when deleting managed assets","number":207329,"url":"https://github.com/elastic/kibana/pull/207329","mergeCommit":{"message":"Add a warning callout when deleting managed assets (#207329)","sha":"c8bd387668ed3e6fe0fd71ec9cfbc5be58bbfc5c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207329","number":207329,"mergeCommit":{"message":"Add a warning callout when deleting managed assets (#207329)","sha":"c8bd387668ed3e6fe0fd71ec9cfbc5be58bbfc5c"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
5cd5f6c
commit 1cf806f
Showing
26 changed files
with
284 additions
and
26 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
15 changes: 15 additions & 0 deletions
15
...latform/packages/shared/kbn-management/delete_managed_assets_callout/README.mdx
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,15 @@ | ||
--- | ||
id: kbn-management/components/DeleteManagedAssetsCallout | ||
slug: /kbn-management/components/delete_managed_assets_callout | ||
title: Delete Managed Assets Callout | ||
description: A callout component that displays a warning message for when a user is about to delete a managed asset. | ||
tags: ['management', 'component'] | ||
date: 2025-01-20 | ||
--- | ||
|
||
This component is used to display a warning callout when a user is about to delete a managed asset. | ||
|
||
|
||
```typescript | ||
<DeleteManagedAssetsCallout assetName="ingest pipeline" /> | ||
``` |
11 changes: 11 additions & 0 deletions
11
src/platform/packages/shared/kbn-management/delete_managed_assets_callout/index.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,11 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export type { DeleteManagedAssetsCalloutProps } from './src/callout'; | ||
export { DeleteManagedAssetsCallout } from './src/callout'; |
7 changes: 7 additions & 0 deletions
7
src/platform/packages/shared/kbn-management/delete_managed_assets_callout/kibana.jsonc
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,7 @@ | ||
{ | ||
"type": "shared-common", | ||
"id": "@kbn/delete-managed-asset-callout", | ||
"owner": "@elastic/kibana-management", | ||
"group": "platform", | ||
"visibility": "shared" | ||
} |
6 changes: 6 additions & 0 deletions
6
src/platform/packages/shared/kbn-management/delete_managed_assets_callout/package.json
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,6 @@ | ||
{ | ||
"name": "@kbn/delete-managed-asset-callout", | ||
"private": true, | ||
"version": "1.0.0", | ||
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0" | ||
} |
25 changes: 25 additions & 0 deletions
25
...form/packages/shared/kbn-management/delete_managed_assets_callout/src/callout.stories.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,25 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { DeleteManagedAssetsCallout as Component } from './callout'; | ||
|
||
export default { | ||
title: 'Developer/Delete Managed Assets Callout', | ||
description: '', | ||
}; | ||
|
||
export const DeleteManagedAssetsCallout = () => { | ||
return <Component assetName="ingest pipelines" />; | ||
}; | ||
|
||
export const ErrorDeleteManagedAssetsCallout = () => { | ||
return <Component assetName="ingest pipelines" color="danger" iconType="trash" />; | ||
}; |
41 changes: 41 additions & 0 deletions
41
src/platform/packages/shared/kbn-management/delete_managed_assets_callout/src/callout.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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import type { EuiCallOutProps } from '@elastic/eui'; | ||
import { EuiCallOut } from '@elastic/eui'; | ||
|
||
export interface DeleteManagedAssetsCalloutProps extends EuiCallOutProps { | ||
assetName: string; | ||
overrideBody?: string; | ||
} | ||
|
||
export const DeleteManagedAssetsCallout = ({ | ||
assetName, | ||
overrideBody, | ||
...overrideCalloutProps | ||
}: DeleteManagedAssetsCalloutProps) => { | ||
return ( | ||
<EuiCallOut | ||
color="warning" | ||
iconType="warning" | ||
data-test-subj="deleteManagedAssetsCallout" | ||
{...overrideCalloutProps} | ||
> | ||
<p> | ||
{overrideBody ?? | ||
i18n.translate('management.deleteManagedAssetsCallout.body', { | ||
defaultMessage: `Elasticsearch automatically re-creates any missing managed {assetName}. If you delete managed {assetName}, the deletion appears as successful, but the {assetName} are immediately re-created and reappear.`, | ||
values: { assetName }, | ||
})} | ||
</p> | ||
</EuiCallOut> | ||
); | ||
}; |
21 changes: 21 additions & 0 deletions
21
src/platform/packages/shared/kbn-management/delete_managed_assets_callout/tsconfig.json
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,21 @@ | ||
{ | ||
"extends": "../../../../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "target/types", | ||
"types": [ | ||
"jest", | ||
"node", | ||
"react" | ||
] | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
"target/**/*" | ||
], | ||
"kbn_references": [ | ||
"@kbn/i18n", | ||
] | ||
} |
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
Oops, something went wrong.