allow to check for restarting state

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-03-15 12:45:31 +01:00
parent 817df30465
commit 83ae27ef76
5 changed files with 56 additions and 3 deletions

View file

@ -20,6 +20,7 @@
This is beta software and not production ready.<br><br>
{% set isAnyRunning = false %}
{% set isAnyRestarting = false %}
{% set isWatchtowerRunning = false %}
{% set isBackupContainerRunning = false %}
{% set isRestoreRunning = false %}
@ -30,6 +31,9 @@
{% if class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' and container.GetIdentifier() != 'nextcloud-aio-domaincheck' and container.GetIdentifier() != 'nextcloud-aio-borgbackup' and container.GetIdentifier() != 'nextcloud-aio-watchtower' %}
{% set isAnyRunning = true %}
{% endif %}
{% if ( container.GetIdentifier() starts with 'nextcloud-aio-redis' or container.GetIdentifier() starts with 'nextcloud-aio-database' or container.GetIdentifier() starts with 'nextcloud-aio-nextcloud' or container.GetIdentifier() starts with 'nextcloud-aio-apache' ) and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %}
{% set isAnyRestarting = true %}
{% endif %}
{% if container.GetIdentifier() == 'nextcloud-aio-watchtower' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
{% set isWatchtowerRunning = true %}
{% endif %}
@ -81,8 +85,18 @@
Initial Nextcloud password: {{ nextcloud_password }}<br /><br/>
<a href="https://{{ domain }}" class="button" target="_blank" rel="noopener">Open your Nextcloud ↗</a><br/>
{% else %}
Containers are currently starting.<br /><br />
<a href="" class="button reload">Reload ↻</a><br/>
{% if isAnyRestarting == false %}
Containers are currently starting.<br /><br />
<a href="" class="button reload">Reload ↻</a><br/><br>
{% else %}
It seems like at least one container is currently restarting which means it is not able to start correctly.<br><br>
To break out this endless loop, you can stop the containers below and investigate the issue by having a look at the container logs before starting them again.<br><br>
<form method="POST" action="/api/docker/stop" class="xhr">
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input class="button" type="submit" value="Stop containers" />
</form>
{% endif %}
{% endif %}
{% endif %}
@ -110,7 +124,7 @@
{% if has_update_available == true %}
{% if is_mastercontainer_update_available == false %}
⚠ Container updates are available. Click on `Stop Containers` and `Start Containers` to update them. You should consider creating a backup first.<br><br>
⚠ Container updates are available. Click on 'Stop Containers' and 'Start Containers' to update them. You should consider creating a backup first.<br><br>
{% endif %}
{% else %}
{% if is_mastercontainer_update_available == false %}