mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 10:50:10 +00:00
Merge pull request #7724 from nextcloud/enh/7664/backup-check-repair
DockerController: refactor `StartBackupContainerCheckRepair` show the starting state
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<details>
|
||||
<summary>Reveal repair option</summary>
|
||||
<p>Below is the option to repair the integrity of your backup. <strong>Please note:</strong> Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)</p>
|
||||
<form method="POST" action="api/docker/backup-check-repair" class="xhr">
|
||||
<form method="POST" action="api/docker/backup-check-repair" target="overlay-log">
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input type="submit" value="Check and repair backup integrity" onclick="return confirm('Check and repair backup integrity? Are you sure that you want to check and repair the backup integrity? This should only be done after reading the mentioned documentation.')"/>
|
||||
@@ -407,7 +407,7 @@
|
||||
<details>
|
||||
<summary>Reveal repair option</summary>
|
||||
<p>Below is the option to repair the integrity of your backup. <strong>Please note:</strong> Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)</p>
|
||||
<form method="POST" action="api/docker/backup-check-repair" class="xhr">
|
||||
<form method="POST" action="api/docker/backup-check-repair" target="overlay-log">
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input type="submit" value="Check and repair backup integrity" onclick="return confirm('Check and repair backup integrity? Are you sure that you want to check and repair the backup integrity? This should only be done after reading the mentioned documentation.')"/>
|
||||
|
||||
Reference in New Issue
Block a user