57 lines
2.2 KiB
HTML
57 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<!--<div class="text-center">
|
|
<button class="btn btn-success btn-lg mb-5"><i class="fas fa-plus"></i> new</button>
|
|
</div>-->
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
{% for instance in instances %}
|
|
{% set color = "dark" %}
|
|
{% if instance["status"] == "running" %}
|
|
{% set color = "success" %}
|
|
{% elif instance["status"] == "created" or instance["status"] == "restarting" or instance["status"] == "paused" %}
|
|
{% set color = "warning" %}
|
|
{% elif instance["status"] == "exited" or instance["status"] == "dead" %}
|
|
{% set color = "danger" %}
|
|
{% endif %}
|
|
|
|
<div class="col col-6">
|
|
<div class="card border-{{ color }} mb-3" style="max-width: 80rem;">
|
|
<div class="card-header border-{{ color }} bg-{{ color }} text-white">
|
|
{{ instance["name"] }}
|
|
<div class="btn-group mx-2 float-end" role="group">
|
|
<button id="btnGroupDrop1" class="btn btn-sm dropdown-toggle btn-light" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="fas fa-cogs"> manage container</i>
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
|
<li><a class="dropdown-item" href="instance/start/{{ instance["id"] }}">Start</a></li>
|
|
<li><a class="dropdown-item" href="instance/stop/{{ instance["id"] }}">Stop</a></li>
|
|
<li><a class="dropdown-item" href="instance/restart/{{ instance["id"] }}">Restart</a></li>
|
|
<li><a class="dropdown-item" href="#">Remove</a></li>
|
|
</ul>
|
|
</div>
|
|
<button class="btn btn-sm mx-2 float-end btn-light"><i class="fas fa-redo-alt"></i> reload nginx</button>
|
|
</div>
|
|
<div class="card-body text-dark">
|
|
<h5 class="card-title">Status : {{ instance["status"] }}</h5>
|
|
<span class="card-text">
|
|
Environment variables :<br />
|
|
{% set envfilter = ["PATH", "NGINX_VERSION", "NJS_VERSION", "PKG_RELEASE"] %}
|
|
{% for env in instance.attrs["Config"]["Env"] %}
|
|
{% if not env.startswith("PATH=") and not env.startswith("NGINX_VERSION=") and not env.startswith("NJS_VERSION=") and not env.startswith("PKG_RELEASE=") %}
|
|
{{ env }}<br />
|
|
{% endif %}
|
|
{% endfor %}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|