diff --git a/client/src/Pages/Incidents/Components/IncidentTable/index.jsx b/client/src/Pages/Incidents/Components/IncidentTable/index.jsx index 3b2e07238..b3e2d2f30 100644 --- a/client/src/Pages/Incidents/Components/IncidentTable/index.jsx +++ b/client/src/Pages/Incidents/Components/IncidentTable/index.jsx @@ -32,15 +32,17 @@ const IncidentTable = ({ const selectedMonitorDetails = monitors?.[selectedMonitor]; const selectedMonitorType = selectedMonitorDetails?.type; + const status = filter === "resolved" ? true : false; + const [checksMonitor, checksCountMonitor, isLoadingMonitor, networkErrorMonitor] = useFetchChecksByMonitor({ monitorId: selectedMonitor === "0" ? undefined : selectedMonitor, type: selectedMonitorType, - status: false, + status: status, sortOrder: "desc", limit: null, dateRange, - filter: filter, + filter: filter === "resolved" ? "resolve" : filter, page: page, rowsPerPage: rowsPerPage, enabled: selectedMonitor !== "0", @@ -48,11 +50,11 @@ const IncidentTable = ({ const [checksTeam, checksCountTeam, isLoadingTeam, networkErrorTeam] = useFetchChecksTeam({ - status: false, + status: status, sortOrder: "desc", limit: null, dateRange, - filter: filter, + filter: filter === "resolved" ? "resolve" : filter, page: page, rowsPerPage: rowsPerPage, enabled: selectedMonitor === "0", diff --git a/client/src/Pages/Incidents/Components/OptionsHeader/index.jsx b/client/src/Pages/Incidents/Components/OptionsHeader/index.jsx index 20140e8c4..08a9bcf1c 100644 --- a/client/src/Pages/Incidents/Components/OptionsHeader/index.jsx +++ b/client/src/Pages/Incidents/Components/OptionsHeader/index.jsx @@ -87,6 +87,13 @@ const OptionsHeader = ({ > {t("incidentsOptionsHeaderFilterCannotResolve")} + diff --git a/client/src/locales/en.json b/client/src/locales/en.json index ff878c3da..ec943dd65 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -187,6 +187,7 @@ "incidentsOptionsHeaderFilterAll": "All", "incidentsOptionsHeaderFilterDown": "Down", "incidentsOptionsHeaderFilterCannotResolve": "Cannot resolve", + "incidentsOptionsHeaderFilterResolved": "Resolved", "incidentsOptionsHeaderShow": "Show:", "incidentsOptionsHeaderLastHour": "Last hour", "incidentsOptionsHeaderLastDay": "Last day", @@ -746,4 +747,4 @@ "settingsEmailPool": "Pool - Enable connection pooling", "sendTestNotifications": "Send test notifications", "selectAll": "Select all" -} \ No newline at end of file +}