Add read-only OCSentinel debug dashboard
Some checks failed
OfficeCom Sentinel Client / validate-client (push) Successful in 23s
OfficeCom Sentinel Client / build-client-windows (push) Failing after 18s

This commit is contained in:
OfficeCom Codex
2026-07-26 02:59:51 +02:00
parent 1c2170090e
commit 6ceb29a07b
9 changed files with 224 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}OCSentinel Debug{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
</head>
<body>
<header class="masthead">
<a href="/" class="brand"><span>OC</span> Sentinel Debug</a>
<div class="badge">read-only database console</div>
</header>
<main>{% block content %}{% endblock %}</main>
</body>
</html>

View File

@@ -0,0 +1,7 @@
{% extends "base.html" %}
{% block title %}{{ report[0] }} · OCSentinel Debug{% endblock %}
{% block content %}
<section class="hero compact"><p class="eyebrow">Gerätedetail</p><h1>{{ report[0] }}</h1><p><span class="state {{ report[6] }}">{{ report[6] }}</span> · Eingang {{ report[5] }}</p></section>
<section class="metrics compact-metrics"><article><span>Events</span><strong>{{ report[8] }}</strong></article><article><span>Quell-IPs</span><strong>{{ report[9] }}</strong></article><article><span>CVEs</span><strong>{{ report[10] }}</strong></article><article><span>Kritisch/High</span><strong class="critical">{{ report[11] }}</strong></article></section>
<section class="panel"><div class="panel-heading"><p class="eyebrow">Forensik</p><h2>Signierter Rohreport</h2></div><pre>{{ payload_pretty }}</pre></section>
{% endblock %}

View File

@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block content %}
<section class="hero">
<p class="eyebrow">Central Ingest</p>
<h1>Endpoint Signals, ohne Rauschen.</h1>
<p>Letzte signierte OCSentinel-Berichte aus PostgreSQL.</p>
</section>
<section class="metrics">
<article><span>Berichtende Geräte</span><strong>{{ summary[0] }}</strong></article>
<article><span>Warnungen</span><strong class="warning">{{ summary[1] }}</strong></article>
<article><span>Kritisch</span><strong class="critical">{{ summary[2] }}</strong></article>
<article><span>Events</span><strong>{{ summary[3] }}</strong></article>
<article><span>Letzter Eingang</span><strong class="timestamp">{{ summary[7] or 'noch keiner' }}</strong></article>
</section>
{% if alerts %}
<section class="panel alert-panel">
<div class="panel-heading"><p class="eyebrow">Priorität</p><h2>Auffällige Geräte</h2></div>
<div class="alert-grid">
{% for alert in alerts %}
<a class="alert-card {{ alert[1] }}" href="{{ url_for('device', machine_name=alert[0]) }}">
<span>{{ alert[1] }}</span><strong>{{ alert[0] }}</strong><small>{{ alert[2] }} Events · {{ alert[3] }} IPs · {{ alert[4] }}</small>
</a>
{% endfor %}
</div>
</section>
{% endif %}
<section class="panel">
<div class="panel-heading"><p class="eyebrow">Live-Bestand</p><h2>Letzte Geräteberichte</h2></div>
<div class="table-wrap"><table><thead><tr><th>Gerät</th><th>Organisation</th><th>Status</th><th>Events</th><th>IPs</th><th>Empfangen</th></tr></thead>
<tbody>{% for row in reports %}<tr><td><a href="{{ url_for('device', machine_name=row[0]) }}">{{ row[0] }}</a></td><td>{{ row[1] or '—' }}</td><td><span class="state {{ row[3] }}">{{ row[3] }}</span></td><td>{{ row[4] }}</td><td>{{ row[5] }}</td><td>{{ row[2] or '—' }}</td></tr>{% endfor %}</tbody></table></div>
</section>
{% endblock %}