From 49d743c17c7cd24334a15e0e0c666fb595686fd3 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 9 Mar 2026 18:13:21 +0100 Subject: [PATCH] DockerController: refactor `StartBackupContainerCheckRepair` show the starting state Signed-off-by: Simon L. --- php/src/Controller/DockerController.php | 10 ++++++++-- php/templates/containers.twig | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 3bb59233..737afb1f 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -153,13 +153,19 @@ readonly class DockerController { public function StartBackupContainerCheckRepair(Request $request, Response $response, array $args) : Response { $this->configurationManager->backupMode = 'check-repair'; + // Get streaming response start and closure + $nonbufResp = $this->startStreamingResponse($response); + $addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp); + $id = 'nextcloud-aio-borgbackup'; - $this->PerformRecursiveContainerStart($id); + $this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody); // Restore to backup check which is needed to make the UI logic work correctly $this->configurationManager->backupMode = 'check'; - return $response->withStatus(201)->withHeader('Location', '.'); + // End streaming response + $this->finalizeStreamingResponse($nonbufResp); + return $nonbufResp; } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { diff --git a/php/templates/containers.twig b/php/templates/containers.twig index fa174836..a67037ef 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -150,7 +150,7 @@
Reveal repair option

Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)

-
+ @@ -407,7 +407,7 @@
Reveal repair option

Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)

- +