feat: detailed control center status and history #2
1 changed files with 18 additions and 0 deletions
|
|
@ -7,6 +7,23 @@
|
||||||
<article class="kpi"><span>POLICY</span><strong>{{ ('AUS' if not policy.get('enabled') else policy.get('mode','—')|upper) }}</strong><small>ab {{ policy.get('min_sessions','—') }} Streams</small></article>
|
<article class="kpi"><span>POLICY</span><strong>{{ ('AUS' if not policy.get('enabled') else policy.get('mode','—')|upper) }}</strong><small>ab {{ policy.get('min_sessions','—') }} Streams</small></article>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
{% set host=state.get('host',{}) %}{% set tc_detail=state.get('tc_detail',{}) %}
|
||||||
|
<section class="detail-strip">
|
||||||
|
<div><span>OVH Uptime</span><strong>{{ host.get('uptime_seconds',0)|duration }}</strong></div>
|
||||||
|
<div><span>Load 1/5/15</span><strong>{{ (host.get('load') or ['—','—','—'])|join(' / ') }}</strong></div>
|
||||||
|
<div><span>RAM</span><strong>{{ host.get('memory_used',0)|bytes }} / {{ host.get('memory_total',0)|bytes }}</strong></div>
|
||||||
|
<div><span>Root-Disk</span><strong>{{ host.get('disk_used',0)|bytes }} / {{ host.get('disk_total',0)|bytes }}</strong></div>
|
||||||
|
<div><span>Historie</span><strong>{{ state.get('totals',{}).get('sessions',0) }} Sessions · {{ state.get('totals',{}).get('known_ips',0) }} IPs</strong></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% if state.get('sessions') %}
|
||||||
|
<section class="panel"><div class="panel-head"><div><p class="eyebrow">LIVE</p><h2>Aktive Sessions</h2></div><a class="text-link" href="/history#sessions">vollständige History →</a></div>
|
||||||
|
<div class="table-wrap"><table><thead><tr><th>Benutzer</th><th>Titel</th><th>Gerät</th><th>Standort</th><th>IP</th><th>Seit</th></tr></thead><tbody>
|
||||||
|
{% for s in state.get('sessions',[]) %}<tr><td><strong>{{ s.user_name }}</strong></td><td>{{ s.series or s.title }}{% if s.series %}<small class="cell-sub">{{ s.title }}</small>{% endif %}</td><td>{{ s.device }}<small class="cell-sub">{{ s.client }}</small></td><td>{{ [s.city,s.country]|select|join(', ') }}<small class="cell-sub">{{ s.asn }}</small></td><td class="mono">{{ s.ip }}</td><td>{{ s.started_at|dt }}</td></tr>{% endfor %}
|
||||||
|
</tbody></table></div>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<section class="panel"><div class="panel-head"><div><p class="eyebrow">SCHNELLWAHL</p><h2>Traffic-Profile</h2></div><small>Wirkt sofort auf die aktiven tc-Klassen am OVH</small></div>
|
<section class="panel"><div class="panel-head"><div><p class="eyebrow">SCHNELLWAHL</p><h2>Traffic-Profile</h2></div><small>Wirkt sofort auf die aktiven tc-Klassen am OVH</small></div>
|
||||||
<div class="profile-grid control-profiles">
|
<div class="profile-grid control-profiles">
|
||||||
{% for key,p in profiles.items() %}
|
{% for key,p in profiles.items() %}
|
||||||
|
|
@ -44,6 +61,7 @@
|
||||||
<tr><td>Markierungsregeln</td><td><strong>{{ state.get('mark_rules','—') }}</strong></td></tr>
|
<tr><td>Markierungsregeln</td><td><strong>{{ state.get('mark_rules','—') }}</strong></td></tr>
|
||||||
<tr><td>Region-Netze</td><td><strong>{{ state.get('ipsets',{}).get('geo-a-v4',0)+state.get('ipsets',{}).get('geo-a-v6',0) }}</strong></td></tr>
|
<tr><td>Region-Netze</td><td><strong>{{ state.get('ipsets',{}).get('geo-a-v4',0)+state.get('ipsets',{}).get('geo-a-v6',0) }}</strong></td></tr>
|
||||||
<tr><td>Cloud-Netze</td><td><strong>{{ state.get('ipsets',{}).get('cloud-v4',0)+state.get('ipsets',{}).get('cloud-v6',0) }}</strong></td></tr>
|
<tr><td>Cloud-Netze</td><td><strong>{{ state.get('ipsets',{}).get('cloud-v4',0)+state.get('ipsets',{}).get('cloud-v6',0) }}</strong></td></tr>
|
||||||
|
{% for key,label in [('ch','Region-Traffic'),('vpn','Cloud-Traffic'),('default','Standard-Traffic')] %}{% set c=tc_detail.get(key,{}) %}<tr><td>{{ label }}</td><td><strong>{{ c.get('bytes',0)|bytes }}</strong><small class="cell-sub">{{ c.get('packets',0) }} Pakete · {{ c.get('drops',0) }} Drops</small></td></tr>{% endfor %}
|
||||||
</tbody></table></div>
|
</tbody></table></div>
|
||||||
<div class="action-row">
|
<div class="action-row">
|
||||||
{% for action,label,cls in [('refresh','Netzlisten aktualisieren','ghost'),('worker','Worker neu starten','ghost'),('admin','Admin neu starten','ghost')] %}<form method="post" action="{{ url_for('maintenance',action=action) }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}"><button class="{{ cls }}">{{ label }}</button></form>{% endfor %}
|
{% for action,label,cls in [('refresh','Netzlisten aktualisieren','ghost'),('worker','Worker neu starten','ghost'),('admin','Admin neu starten','ghost')] %}<form method="post" action="{{ url_for('maintenance',action=action) }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}"><button class="{{ cls }}">{{ label }}</button></form>{% endfor %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue