From 14e2b5ec05428738951597a8e7bb66aebfbb9bb7 Mon Sep 17 00:00:00 2001 From: philmcmahon Date: Wed, 27 Sep 2023 12:32:59 +0100 Subject: [PATCH] If a non-extractor related error occurs, show error icon in ingest events dashboard --- .../src/js/components/IngestionEvents/IngestionEvents.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/js/components/IngestionEvents/IngestionEvents.tsx b/frontend/src/js/components/IngestionEvents/IngestionEvents.tsx index 8ad9c334..002553a6 100644 --- a/frontend/src/js/components/IngestionEvents/IngestionEvents.tsx +++ b/frontend/src/js/components/IngestionEvents/IngestionEvents.tsx @@ -62,8 +62,12 @@ const statusIconColumn = { field: 'extractorStatuses', name: '', width: '40', - render: (statuses: ExtractorStatus[]) => { - return blobStatusIcons[getBlobStatus(statuses)] + render: (statuses: ExtractorStatus[], row: BlobStatus) => { + const totalErrors = row.errors.length + const extractorStatus = getBlobStatus(statuses) + // if extractors have finished but there are other non-extractor related errors, show an error icon + const combinedStatus = extractorStatus === "complete" && totalErrors > 0 ? "completeWithErrors" : extractorStatus + return blobStatusIcons[combinedStatus] } }