From 48329dc965057b66e14813a70ddd7e7e8ef632ce Mon Sep 17 00:00:00 2001 From: Kurt King Date: Fri, 2 Feb 2024 12:32:16 -0700 Subject: [PATCH] include entityRef in alert output Signed-off-by: Kurt King --- .../src/components/FailedEntities.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index 4c01b888b2..4618953af2 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -107,16 +107,22 @@ export const FailedEntities = () => { return ; } - const handleDelete = async ({ id }: { id: string }) => { + const handleDelete = async ({ + id, + entityRef, + }: { + id: string; + entityRef: string; + }) => { try { await unprocessedEntityApi.delete(id); alertApi.post({ - message: `Entity has been deleted`, + message: `Entity ${entityRef} has been deleted`, severity: 'success', }); } catch (e) { alertApi.post({ - message: `Ran into an issue when deleting. Please try again later.`, + message: `Ran into an issue when deleting ${entityRef}. Please try again later.`, severity: 'error', }); } @@ -165,6 +171,7 @@ export const FailedEntities = () => { onClick={async () => await handleDelete({ id: (rowData as UnprocessedEntity).entity_id, + entityRef: (rowData as UnprocessedEntity).entity_ref, }) } >