Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ describe('Exceptions Table', () => {
expectedExportedExceptionList(this.exceptionListResponse)
);

cy.get(TOASTER).should('have.text', 'Exception list export success');
cy.get(TOASTER).should(
'have.text',
`Exception list "${getExceptionList1().name}" exported successfully`
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ describe('Exceptions Table', () => {
expectedExportedExceptionList(this.exceptionListResponse)
);

cy.get(TOASTER).should('have.text', 'Exception list export success');
cy.get(TOASTER).should(
'have.text',
`Exception list "${getExceptionList1().name}" exported successfully`
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ interface ExceptionsListCardProps {
id,
includeExpiredExceptions,
listId,
name,
namespaceType,
}: {
id: string;
includeExpiredExceptions: boolean;
listId: string;
name: string;
namespaceType: NamespaceType;
}) => () => Promise<void>;
readOnly: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { checkIfListCannotBeEdited } from '../../utils/list.utils';
interface ExportListAction {
id: string;
listId: string;
name: string;
namespaceType: NamespaceType;
includeExpiredExceptions: boolean;
}
Expand All @@ -42,6 +43,7 @@ export const useExceptionsListCard = ({
handleExport: ({
id,
listId,
name,
namespaceType,
includeExpiredExceptions,
}: ExportListAction) => () => Promise<void>;
Expand Down Expand Up @@ -192,6 +194,7 @@ export const useExceptionsListCard = ({
handleExport({
id: exceptionsList.id,
listId: exceptionsList.list_id,
name: exceptionsList.name,
namespaceType: exceptionsList.namespace_type,
includeExpiredExceptions,
})();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const useListDetailsView = (exceptionListId: string) => {
onError: (error: Error) => handleErrorStatus(error),
onSuccess: (blob) => {
setExportedList(blob);
toasts?.addSuccess(i18n.EXCEPTION_LIST_EXPORTED_SUCCESSFULLY(list.list_id));
toasts?.addSuccess(i18n.EXCEPTION_LIST_EXPORTED_SUCCESSFULLY(list.name));
},
});
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ export const SharedLists = React.memo(() => {
);

const handleExportSuccess = useCallback(
(listId: string) =>
(listId: string, name: string) =>
(blob: Blob): void => {
addSuccess(i18n.EXCEPTION_EXPORT_SUCCESS);
addSuccess(i18n.EXCEPTION_LIST_EXPORTED_SUCCESSFULLY(name));
setExportDownload({ name: listId, blob });
},
[addSuccess]
Expand All @@ -202,11 +202,13 @@ export const SharedLists = React.memo(() => {
({
id,
listId,
name,
namespaceType,
includeExpiredExceptions,
}: {
id: string;
listId: string;
name: string;
namespaceType: NamespaceType;
includeExpiredExceptions: boolean;
}) =>
Expand All @@ -217,7 +219,7 @@ export const SharedLists = React.memo(() => {
listId,
namespaceType,
onError: handleExportError,
onSuccess: handleExportSuccess(listId),
onSuccess: handleExportSuccess(listId, name),
});
},
[exportExceptionList, handleExportError, handleExportSuccess]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ export const EXCEPTION_ITEM_DELETE_TEXT = (itemName: string) =>
}
);

export const EXCEPTION_LIST_EXPORTED_SUCCESSFULLY = (listName: string) =>
i18n.translate('xpack.securitySolution.exceptions.list.exported_successfully', {
values: { listName },
defaultMessage: '{listName} exported successfully',
});

export const EXCEPTION_LIST_DELETED_SUCCESSFULLY = (listName: string) =>
i18n.translate('xpack.securitySolution.exceptions.list.deleted_successfully', {
values: { listName },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,11 @@ export const NO_LISTS_BODY = i18n.translate(
}
);

export const EXCEPTION_EXPORT_SUCCESS = i18n.translate(
'xpack.securitySolution.detectionEngine.rules.all.exceptions.exportSuccess',
{
defaultMessage: 'Exception list export success',
}
);
export const EXCEPTION_LIST_EXPORTED_SUCCESSFULLY = (listName: string) =>
i18n.translate('xpack.securitySolution.exceptions.list.export_success', {
values: { listName },
defaultMessage: 'Exception list "{listName}" exported successfully',
});

export const EXCEPTION_EXPORT_ERROR = i18n.translate(
'xpack.securitySolution.detectionEngine.rules.all.exceptions.exportError',
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -26776,7 +26776,6 @@
"xpack.securitySolution.exceptions.hideCommentsLabel": "Masquer ({comments}) {comments, plural, =1 {commentaire} other {commentaires}}",
"xpack.securitySolution.exceptions.list.deleted_successfully": "{listName} supprimée avec succès",
"xpack.securitySolution.exceptions.list.exception.item.card.exceptionItemDeleteSuccessText": "\"{itemName}\" supprimé avec succès.",
"xpack.securitySolution.exceptions.list.exported_successfully": "{listName} exporté avec succès",
"xpack.securitySolution.exceptions.referenceModalDefaultDescription": "Voulez-vous vraiment SUPPRIMER la liste d'exceptions nommée {listName} ?",
"xpack.securitySolution.exceptions.referenceModalDescription": "Cette liste d'exceptions est associée à ({referenceCount}) {referenceCount, plural, =1 {règle} other {règles}}. Le retrait de cette liste d'exceptions supprimera également sa référence des règles associées.",
"xpack.securitySolution.exceptions.referenceModalSuccessDescription": "Liste d'exceptions - {listId} - supprimée avec succès.",
Expand Down Expand Up @@ -28632,7 +28631,6 @@
"xpack.securitySolution.detectionEngine.rules.all.exceptions.deleteError": "Une erreur s'est produite lors de la suppression de la liste d'exceptions",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.errorFetching": "Erreur lors de la récupération des listes d'exceptions",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportError": "Erreur d'exportation de la liste d'exceptions",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportSuccess": "Réussite de l'exportation de la liste d'exceptions",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.idTitle": "ID de liste",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.listName": "Nom",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.refresh": "Actualiser",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -26749,7 +26749,6 @@
"xpack.securitySolution.exceptions.hideCommentsLabel": "({comments}){comments, plural, other {件のコメント}}を非表示",
"xpack.securitySolution.exceptions.list.deleted_successfully": "{listName}が正常に削除されました",
"xpack.securitySolution.exceptions.list.exception.item.card.exceptionItemDeleteSuccessText": "\"{itemName}\"が正常に削除されました。",
"xpack.securitySolution.exceptions.list.exported_successfully": "{listName}が正常にエクスポートされました",
"xpack.securitySolution.exceptions.referenceModalDefaultDescription": "名前{listName}の例外リストを削除しますか?",
"xpack.securitySolution.exceptions.referenceModalDescription": "この例外リストは、({referenceCount}) {referenceCount, plural, other {個のルール}}に関連付けられています。この例外リストを削除すると、関連付けられたルールからの参照も削除されます。",
"xpack.securitySolution.exceptions.referenceModalSuccessDescription": "例外リスト{listId}が正常に削除されました。",
Expand Down Expand Up @@ -28604,7 +28603,6 @@
"xpack.securitySolution.detectionEngine.rules.all.exceptions.deleteError": "例外リストの削除中にエラーが発生しました",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.errorFetching": "例外リストの取得エラー",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportError": "例外リストエクスポートエラー",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportSuccess": "例外リストエクスポート成功",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.idTitle": "リスト ID",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.listName": "名前",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.refresh": "更新",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -26784,7 +26784,6 @@
"xpack.securitySolution.exceptions.hideCommentsLabel": "隐藏 ({comments}) 个{comments, plural, other {注释}}",
"xpack.securitySolution.exceptions.list.deleted_successfully": "已成功删除 {listName}",
"xpack.securitySolution.exceptions.list.exception.item.card.exceptionItemDeleteSuccessText": "已成功删除“{itemName}”。",
"xpack.securitySolution.exceptions.list.exported_successfully": "已成功导出 {listName}",
"xpack.securitySolution.exceptions.referenceModalDefaultDescription": "是否确定要删除名为 {listName} 的例外列表?",
"xpack.securitySolution.exceptions.referenceModalDescription": "此例外列表与 ({referenceCount}) 个{referenceCount, plural, other {规则}}关联。移除此例外列表还将会删除其对关联规则的引用。",
"xpack.securitySolution.exceptions.referenceModalSuccessDescription": "例外列表 - {listId} - 已成功删除。",
Expand Down Expand Up @@ -28638,7 +28637,6 @@
"xpack.securitySolution.detectionEngine.rules.all.exceptions.deleteError": "删除例外列表时发生错误",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.errorFetching": "提取例外列表时出错",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportError": "例外列表导出错误",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.exportSuccess": "例外列表导出成功",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.idTitle": "列表 ID",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.listName": "名称",
"xpack.securitySolution.detectionEngine.rules.all.exceptions.refresh": "刷新",
Expand Down