diff --git a/php/public/index.php b/php/public/index.php
index db9cf821..e2a1e641 100644
--- a/php/public/index.php
+++ b/php/public/index.php
@@ -74,13 +74,14 @@ $app->get('/containers', function ($request, $response, $args) use ($container)
return $view->render($response, 'containers.twig', [
'domain' => $configurationManager->GetDomain(),
'borg_backup_host_location' => $configurationManager->GetBorgBackupHostLocation(),
- 'borg_backup_mode' => $configurationManager->GetBorgBackupMode(),
'nextcloud_password' => $configurationManager->GetSecret('NEXTCLOUD_PASSWORD'),
'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(),
'borgbackup_password' => $configurationManager->GetSecret('BORGBACKUP_PASSWORD'),
'is_mastercontainer_update_available' => $dockerActionManger->IsMastercontainerUpdateAvailable(),
'has_backup_run_once' => $configurationManager->hasBackupRunOnce(),
+ 'is_backup_container_running' => $dockerActionManger->isBackupContainerRunning(),
'backup_exit_code' => $dockerActionManger->GetBackupcontainerExitCode(),
+ 'borg_backup_mode' => $configurationManager->GetBorgBackupMode(),
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked(),
'has_update_available' => $dockerActionManger->isAnyUpdateAvailable(),
'last_backup_time' => $configurationManager->GetLastBackupTime(),
diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php
index 77da1206..70e65b48 100644
--- a/php/src/Docker/DockerActionManager.php
+++ b/php/src/Docker/DockerActionManager.php
@@ -600,4 +600,13 @@ class DockerActionManager
}
return true;
}
+
+ public function isBackupContainerRunning() : bool {
+ $id = 'nextcloud-aio-borgbackup';
+ $backupContainer = $this->containerDefinitionFetcher->GetContainerById($id);
+ if ($this->GetContainerRunningState($backupContainer) instanceof RunningState) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/php/templates/containers.twig b/php/templates/containers.twig
index 4d4a5fb2..36ddfb48 100644
--- a/php/templates/containers.twig
+++ b/php/templates/containers.twig
@@ -22,11 +22,19 @@
{% set isAnyRunning = false %}
{% set isAnyRestarting = false %}
{% set isWatchtowerRunning = false %}
- {% set isBackupContainerRunning = false %}
{% set isRestoreRunning = false %}
{% set isBackupOrRestoreRunning = false %}
{% set isApacheStarting = false %}
+ {% if is_backup_container_running == true %}
+ {% if borg_backup_mode == 'restore' %}
+ {% set isRestoreRunning = true %}
+ {% endif %}
+ {% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
+ {% set isBackupOrRestoreRunning = true %}
+ {% endif %}
+ {% endif %}
+
{% for container in containers %}
{% if container.GetIdentifier() not in ['nextcloud-aio-domaincheck', 'nextcloud-aio-borgbackup', 'nextcloud-aio-watchtower'] and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
{% set isAnyRunning = true %}
@@ -40,22 +48,13 @@
{% if container.GetIdentifier() == 'nextcloud-aio-apache' and class(container.GetStartingState()) == 'AIO\\Container\\State\\StartingState' %}
{% set isApacheStarting = true %}
{% endif %}
- {% if container.GetIdentifier() == 'nextcloud-aio-borgbackup' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
- {% set isBackupContainerRunning = true %}
- {% if borg_backup_mode == 'restore' %}
- {% set isRestoreRunning = true %}
- {% endif %}
- {% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
- {% set isBackupOrRestoreRunning = true %}
- {% endif %}
- {% endif %}
{% endfor %}
{% if isWatchtowerRunning == true %}
Mastercontainer update currently running. It will restart the mastercontainer soon which will make it unavailable for a moment. Please wait until that's done. (Logs)
Reload ↻
{% else %}
- {% if isBackupContainerRunning == false and domain == "" %}
+ {% if is_backup_container_running == false and domain == "" %}
{% if is_mastercontainer_update_available == true %}