haproxy-wi/app/templates/ajax/overview.html

56 lines
1.9 KiB
HTML

{% for service in service_status %}
<tr class="{{ loop.cycle('odd', 'even') }}">
<td class="padding10">
<a href="#{{ service.0 }}" title="Go to {{ service.0 }} status" style="color: #000; padding-left: 15px;">
{{ service.0 }}
{% if service.5.0.0|int() >= 1 %}
<img
{% if service.6.0.0|int() >= 1 %}
src="/inc/images/shield.png" title="Auto start enabled"
{% else %}
src="/inc/images/shield-red.png" title="Auto start enabled, but keep alive service does not work"
{% endif %}
width=18 style="padding-left: 5px; margin-bottom: -3px;">
{% endif %}
</a>
</td>
<td class="second-collumn">
{% if service.2|int() >= 1 %}
<span class="serverUp"> UP</span> running {{service.2 }} processes
{% else %}
<span class="serverDown"> DOWN</span> running {{service.2 }} processes
{% endif %}
</td>
<td>
{% if role <= 1 %}
<a id="{{ service.1 }}" class="start" title="Start HAProxy service">
<img src=/inc/images/start.png alt="start" class="icon" style="margin-bottom: -2px;">
</a>
<a id="{{ service.1 }}" class="stop" title="Stop HAProxy service">
<img src=/inc/images/stop.png alt="start" class="icon" width="17px">
</a>
<a id="{{ service.1 }}" class="restart" title="Restart HAProxy service">
<img src=/inc/images/update.png alt="restart" class="icon">
</a>
{% endif %}
{% if role <= 2 %}
<a href="/app/config.py?serv={{ service.1 }}" target="_blank" title="Working with HAProxy configs">
<img src="/inc/images/edit.png" alt="edit" class="icon" width="15px">
</a>
{% endif %}
<a href="/app/viewsttats.py?serv={{ service.1 }}" target="_blank" title="Show stats">
<img src="/inc/images/show.png" alt="show" class="icon" width="20px" style="margin-bottom: -3px;">
</a>
</td>
<td>
{% if "ls: cannot access" in service.3 %}
Cannot find HAProxy config
{% else %}
{{ service.3 }}
{% endif %}
</td>
<td></td>
</tr>
{% endfor %}