aio-interface: add button to update the backup list

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-11-24 18:28:35 +01:00
parent 473ddbfcee
commit 01ad594ec5
7 changed files with 39 additions and 4 deletions

View file

@ -105,6 +105,11 @@ readonly class DockerController {
return $response->withStatus(201)->withHeader('Location', '.');
}
public function StartBackupContainerList(Request $request, Response $response, array $args) : Response {
$this->listBackup();
return $response->withStatus(201)->withHeader('Location', '.');
}
public function checkBackup() : void {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'check';
@ -114,6 +119,15 @@ readonly class DockerController {
$this->PerformRecursiveContainerStart($id);
}
private function listBackup() : void {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'list';
$this->configurationManager->WriteConfig($config);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
}
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'restore';