From c45913a6ffd485969767d01485356c5c0d3c89b2 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 9 Mar 2026 18:07:46 +0100 Subject: [PATCH] DockerController: refactor `StartBackupContainerListto` show the starting state Signed-off-by: Simon L. --- php/src/Controller/DockerController.php | 13 ++++++++++--- php/templates/containers.twig | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 3bb59233..090facac 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -115,8 +115,15 @@ readonly class DockerController { } public function StartBackupContainerList(Request $request, Response $response, array $args) : Response { + // Get streaming response start and closure + $nonbufResp = $this->startStreamingResponse($response); + $addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp); + $this->listBackup(); - return $response->withStatus(201)->withHeader('Location', '.'); + + // End streaming response + $this->finalizeStreamingResponse($nonbufResp); + return $nonbufResp; } public function checkBackup(?\Closure $addToStreamingResponseBody = null) : void { @@ -126,11 +133,11 @@ readonly class DockerController { $this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody); } - private function listBackup() : void { + private function listBackup(?\Closure $addToStreamingResponseBody = null) : void { $this->configurationManager->backupMode = 'list'; $id = 'nextcloud-aio-borgbackup'; - $this->PerformRecursiveContainerStart($id); + $this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody); } public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { diff --git a/php/templates/containers.twig b/php/templates/containers.twig index fa174836..35b83fbc 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -507,7 +507,7 @@
Click here to reveal this option

If you use an external snapshot tool to restore the server that runs AIO, you might run into a problem that the above listed available backups are not up-to-date to restore your server from. You can click the button below to update this list.

-
+