From c45913a6ffd485969767d01485356c5c0d3c89b2 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 9 Mar 2026 18:07:46 +0100 Subject: [PATCH 1/2] 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.

-
+ From 1e23c1a6ddfe9db3228a5607bdc3e628b10cd314 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 12 Mar 2026 16:20:17 +0100 Subject: [PATCH 2/2] apply suggestions by @pabzm Co-authored-by: Pablo Zmdl <57864086+pabzm@users.noreply.github.com> Signed-off-by: Simon L. --- php/src/Controller/DockerController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 090facac..bb838dab 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -119,7 +119,7 @@ readonly class DockerController { $nonbufResp = $this->startStreamingResponse($response); $addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp); - $this->listBackup(); + $this->listBackup($addToStreamingResponseBody); // End streaming response $this->finalizeStreamingResponse($nonbufResp);