Files
FabledSteward/fablednetmon/templates/hosts/list.html
T

48 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% block title %}Hosts — FabledNetMon{% endblock %}
{% block content %}
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;">
<h1 style="color:#c0c0ff;">Hosts</h1>
<a class="btn" href="/hosts/new">Add Host</a>
</div>
{% if hosts %}
<div class="card" style="padding:0;">
<table style="width:100%;border-collapse:collapse;">
<thead>
<tr style="border-bottom:1px solid #2a2a4a;">
<th style="text-align:left;padding:0.75rem 1rem;color:#8080a0;font-weight:normal;">Name</th>
<th style="text-align:left;padding:0.75rem 1rem;color:#8080a0;font-weight:normal;">Address</th>
<th style="text-align:left;padding:0.75rem 1rem;color:#8080a0;font-weight:normal;">Probe</th>
<th style="text-align:left;padding:0.75rem 1rem;color:#8080a0;font-weight:normal;">Monitors</th>
<th style="padding:0.75rem 1rem;"></th>
</tr>
</thead>
<tbody>
{% for host in hosts %}
<tr style="border-bottom:1px solid #1a1a3a;">
<td style="padding:0.75rem 1rem;">{{ host.name }}</td>
<td style="padding:0.75rem 1rem;color:#a0a0c0;">{{ host.address }}</td>
<td style="padding:0.75rem 1rem;color:#a0a0c0;">{{ host.probe_type.value | upper }}:{{ host.probe_port }}</td>
<td style="padding:0.75rem 1rem;color:#a0a0c0;">
{% if host.ping_enabled %}<span style="color:#60c060;">ping</span>{% endif %}
{% if host.dns_enabled %}<span style="color:#6090c0;margin-left:0.5rem;">dns</span>{% endif %}
</td>
<td style="padding:0.75rem 1rem;text-align:right;">
<a href="/hosts/{{ host.id }}/edit" style="color:#a0a0ff;margin-right:1rem;">Edit</a>
<form method="post" action="/hosts/{{ host.id }}/delete" style="display:inline;">
<button type="submit" style="background:none;border:none;color:#ff6060;cursor:pointer;"
onclick="return confirm('Delete {{ host.name }}?')">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="card">
<p style="color:#606080;">No hosts configured yet. <a href="/hosts/new" style="color:#a0a0ff;">Add one.</a></p>
</div>
{% endif %}
{% endblock %}