154 lines
5.3 KiB
HTML
154 lines
5.3 KiB
HTML
{% extends "base.html" %} {% block content %}
|
|
<div class="container mt-5 mb-3">
|
|
{% if instances|length == 0 %}
|
|
<div class="row justify-content-center">
|
|
<div class="col col-12 alert alert-primary text-center">
|
|
No instance to show...
|
|
</div>
|
|
</div>
|
|
{% else %} {% for instances_batched in instances|batch(2) %}
|
|
<div class="row">
|
|
{% for instance in instances_batched %}
|
|
<div class="col-lg-6">
|
|
<form id="form-instance-{{ instance._id }}" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<input type="hidden" name="INSTANCE_ID" value="{{ instance._id }}" />
|
|
<div class="card p-3 mb-2">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="d-flex flex-row align-items-center">
|
|
{% if instance._type == "local" %} {% if instance.health %}
|
|
<button
|
|
class="state-button icon {{ instance.health }}"
|
|
type="submit"
|
|
name="operation"
|
|
value="stop"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="bottom"
|
|
title="Stop"
|
|
>
|
|
<i class="fa-solid fa-power-off"></i>
|
|
</button>
|
|
{% else %}
|
|
<button
|
|
class="state-button icon {{ instance.health }}"
|
|
type="submit"
|
|
name="operation"
|
|
value="start"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="bottom"
|
|
title="Start"
|
|
>
|
|
<i class="fa-solid fa-power-off"></i>
|
|
</button>
|
|
{% endif %} {% else %}
|
|
<button
|
|
class="state-button icon {{ instance.health }}"
|
|
type="submit"
|
|
name="operation"
|
|
value="reload"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-placement="bottom"
|
|
title="Reload"
|
|
>
|
|
<i class="fa-solid fa-power-off"></i>
|
|
</button>
|
|
{% endif %}
|
|
<div class="ms-2 c-details">
|
|
<h6 class="mb-0">{{ instance.name }}</h6>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex flex-row align-items-center">
|
|
<div class="badge dropdown">
|
|
<button
|
|
type="button"
|
|
class="btn btn-outline-secondary"
|
|
id="dropdownInfoButton"
|
|
data-bs-toggle="dropdown"
|
|
aria-expanded="false"
|
|
>
|
|
<i class="fa-solid fa-circle-info"></i>
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="dropdownInfoButton">
|
|
<li>
|
|
<a class="dropdown-item"
|
|
><b>Hostname</b>: <i>{{ instance.hostname }}</i></a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item"
|
|
><b>Type</b>: <i>{{ instance._type }}</i></a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="badge dropdown">
|
|
<button
|
|
type="button"
|
|
class="btn btn-outline-secondary"
|
|
id="dropdownSettingsButton"
|
|
data-bs-toggle="dropdown"
|
|
aria-expanded="false"
|
|
>
|
|
<i class="fa-solid fa-sliders fa-rotate-90"></i>
|
|
</button>
|
|
<ul
|
|
class="dropdown-menu"
|
|
aria-labelledby="dropdownSettingsButton"
|
|
>
|
|
<li>
|
|
<button
|
|
class="dropdown-item"
|
|
type="submit"
|
|
name="operation"
|
|
value="reload"
|
|
>
|
|
Reload
|
|
</button>
|
|
</li>
|
|
{% if instance._type == "local" and not instance.health %}
|
|
<li>
|
|
<button
|
|
class="dropdown-item"
|
|
type="submit"
|
|
name="operation"
|
|
value="start"
|
|
>
|
|
Start
|
|
</button>
|
|
</li>
|
|
{% endif %} {% if instance.health %}
|
|
<li>
|
|
<button
|
|
class="dropdown-item"
|
|
type="submit"
|
|
name="operation"
|
|
value="stop"
|
|
>
|
|
Stop
|
|
</button>
|
|
</li>
|
|
{% endif %} {% if instance._type == "local" %}
|
|
<li>
|
|
<button
|
|
class="dropdown-item"
|
|
type="submit"
|
|
name="operation"
|
|
value="restart"
|
|
>
|
|
Restart
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %} {% endif %}
|
|
</div>
|
|
{% endblock %}
|