all-in-one/php/templates/components/container-state.twig
Jean-Yves 0e88a15edb
Add container state component for improved status display and hide password by default
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
2025-03-01 20:57:21 +01:00

23 lines
No EOL
715 B
Twig

{# @var c \App\Containers\Container #}
<li>
{% if c.GetStartingState().value == 'starting' %}
<span class="status running"></span>
{% elseif c.GetRunningState().value == 'running' %}
<span class="status success"></span>
{% else %}
<span class="status error"></span>
{% endif %}
<span>
{{ c.GetDisplayName() }}
(<a href="/api/docker/logs?id={{ c.GetIdentifier() }}" target="_blank">Stopped</a>)
{% if c.GetDocumentation() != '' %}
(<a target="_blank" href="{{ c.GetDocumentation() }}">docs</a>)
{% endif %}
</span>
{% if c.GetUiSecret() != '' %}
<details>
<summary>Show password</summary>
<p>{{ c.GetUiSecret() }}</p>
</details>
{% endif %}
</li>