From 837717461ffaec0379fb72b7d92fe39ecd81dacb Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 4 Oct 2025 07:37:22 -0700 Subject: [PATCH] Fix: count only error status as failures in backrest (#5844) --- src/widgets/backrest/proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/backrest/proxy.js b/src/widgets/backrest/proxy.js index 610f76fcb..1b1052b87 100644 --- a/src/widgets/backrest/proxy.js +++ b/src/widgets/backrest/proxy.js @@ -24,10 +24,11 @@ function buildResponse(plans) { plans.forEach((plan) => { const statuses = plan?.recentBackups?.status; + // See https://github.com/garethgeorge/backrest/blob/4357295a17cb2e71639473c9929a060c4dd1b624/proto/v1/operations.proto#L78-L87 if (Array.isArray(statuses) && statuses.length > 0) { if (statuses[0] === "STATUS_SUCCESS") { numSuccessLatest++; - } else { + } else if (statuses[0] === "STATUS_ERROR") { numFailureLatest++; } }