39 lines
1.7 KiB
HTML
39 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Services{% endblock %}
|
|
{% block content %}
|
|
<div class="page-head">
|
|
<h1>Services</h1>
|
|
<button type="button" class="btn" id="refresh-services">Refresh now</button>
|
|
</div>
|
|
{% if not daemon_ok %}<div class="flash error">patchbayd is not reachable; showing the last reported data.</div>{% endif %}
|
|
<p class="muted">Listening TCP ports and bound UDP ports on every host, with the process that owns them. Clients report every few seconds while connected.</p>
|
|
{% for h in hosts %}
|
|
<section class="card">
|
|
<h2><span class="dot {{ 'on' if h.online else 'off' }}" title="{{ 'online' if h.online else 'offline' }}"></span>{{ h.name }}</h2>
|
|
{% if h.ifaces %}
|
|
<p class="small">Tunnel interfaces:
|
|
{% for i in h.ifaces %}<span class="mono">{{ i.name }}</span>{% if i.addr != '-' %} <span class="muted mono">{{ i.addr }}</span>{% endif %}{{ ', ' if not loop.last }}{% endfor %}
|
|
</p>
|
|
{% endif %}
|
|
{% if h.services %}
|
|
<table class="grid">
|
|
<thead><tr><th>Proto</th><th>Address</th><th class="num">Port</th><th>Process</th><th class="num">PID</th></tr></thead>
|
|
<tbody>
|
|
{% for s in h.services %}
|
|
<tr><td>{{ s.proto | upper }}</td><td class="mono">{{ s.addr }}</td><td class="num mono">{{ s.port }}</td>
|
|
<td>{{ s.process }}</td><td class="num mono">{{ s.pid or '-' }}</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<p class="muted small" data-ts="{{ h.updated }}">Updated <span class="ts"></span></p>
|
|
{% else %}
|
|
<p class="muted">No data reported yet.</p>
|
|
{% endif %}
|
|
</section>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='common.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='services.js') }}"></script>
|
|
{% endblock %}
|