From 479f22ac69b48dfb360129f03ae70422e56859eb Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 2 Feb 2026 05:41:32 +0000 Subject: [PATCH] resolution details --- .../Incidents/Components/CardDetails.tsx | 67 ++++++++++++++++++- client/src/Pages/Incidents/index.tsx | 2 - client/src/locales/en.json | 11 ++- 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/client/src/Pages/Incidents/Components/CardDetails.tsx b/client/src/Pages/Incidents/Components/CardDetails.tsx index c2b2f4140..4c6545428 100644 --- a/client/src/Pages/Incidents/Components/CardDetails.tsx +++ b/client/src/Pages/Incidents/Components/CardDetails.tsx @@ -27,6 +27,7 @@ export const CardDetails = ({ incident, monitor, sx }: CardDetailsProps) => { if (!incident) { return null; } + console.log(incident); return ( { - {t("pages.incidents.dialog.details.analysis")} + + {t("pages.incidents.dialog.details.analysis")} + { + {!incident.status && ( + + + + {t("pages.incidents.dialog.details.resolutionDetails")} + + + + + {t("pages.incidents.dialog.details.resolvedAt")} + + + + {incident.endTime + ? formatDateWithTz(incident.endTime, "D MMM YYYY, h:mm A", uiTimezone) + : "N/A"} + + + + + {t("pages.incidents.dialog.details.resolutionType")} + + + + + {incident.resolutionType + ? t( + `pages.incidents.dialog.details.resolutionTypes.${incident.resolutionType}` + ) + : "N/A"} + + + {incident.resolvedBy && ( + <> + + + {t("pages.incidents.dialog.details.resolvedBy")} + + + + {incident.resolvedBy} + + + )} + {incident.comment && ( + <> + + {t("pages.incidents.dialog.details.comment")} + + + {incident.comment} + + + )} + + + + )} ); }; diff --git a/client/src/Pages/Incidents/index.tsx b/client/src/Pages/Incidents/index.tsx index 5addfc12d..aaac5fab5 100644 --- a/client/src/Pages/Incidents/index.tsx +++ b/client/src/Pages/Incidents/index.tsx @@ -111,8 +111,6 @@ const IncidentsPage = () => { const handleDetailsClose = () => { setIsDetailsDialogOpen(false); - setSelectedIncident(null); - setSelectedIncidentMonitor(null); }; const handleDetailsResolve = () => { diff --git a/client/src/locales/en.json b/client/src/locales/en.json index effd87331..8ec6bf20f 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -408,7 +408,16 @@ "startedAt": "Started at:", "statusCode": "Status code:", "downtime": "Downtime:", - "message": "Message:" + "message": "Message:", + "resolutionDetails": "Resolution details", + "resolvedAt": "Resolved at:", + "resolutionType": "Type:", + "resolvedBy": "Resolved by:", + "comment": "Comment:", + "resolutionTypes": { + "automatic": "Automatic", + "manual": "Manual" + } } } }