Commit graph

14 commits

Author SHA1 Message Date
ppfeiffer c443a9f26d feat(auth): Rolle Mitarbeiter + Einladungs-Workflow (closes #7)
- Rollensystem: Public → Mitarbeiter → Admin (Rolle user entfällt)
- DB-Migration: must_change_password-Spalte, user→mitarbeiter
- require_staff_api(): erlaubt mitarbeiter + admin
- POST /api/admin/invite: Einladung mit auto-generiertem Passwort + E-Mail
- POST /auth/change-password: Pflicht-Passwortwechsel
- Login: force_password_change-Redirect
- Sidebar: sidebar-staff für Scheduler/NINA/Einstellungen
- Scheduler/NINA: read-only für Mitarbeiter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 22:51:06 +01:00
ppfeiffer b431797d32 fix(db): upsert_node Race-Condition behoben (UNIQUE constraint)
INSERT OR IGNORE + UPDATE statt SELECT → INSERT eliminiert den
UNIQUE-constraint-Fehler bei konkurrierenden async-Aufrufen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 22:08:10 +01:00
ppfeiffer 57182c5412 fix(db): Datenbank nach data/ verschoben, WAL-Checkpoint + robuster Shutdown
- database.path in config.yaml: meshdd.db → data/meshdd.db
- data/.gitkeep: Verzeichnis in Git verankert, *.db-wal/shm gitignored
- database.py: PRAGMA wal_checkpoint(FULL) vor db.close() für sauberes Schließen
- main.py: Shutdown-Schritte einzeln mit try/except gekapselt;
  db.close() wird jetzt auch bei Fehlern in vorherigen Schritten ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:59:40 +01:00
ppfeiffer 644d2d00ba feat(config): Online-Schwellwert konfigurierbar (web.online_threshold)
- config.yaml: neuer Parameter web.online_threshold (Default: 900 s)
- /api/stats und WS stats_update liefern online_threshold
- dashboard.js: isOnline() nutzt onlineThreshold aus Stats-API
- bot.py (?mesh) und database.py (nodes_online) nutzen Config-Wert
Closes #12.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 15:17:05 +01:00
ppfeiffer 33c05c0a32 feat(scheduler): Variablen-Badges theme-aware + neue Variablen nodes_online, version
- Badge-Styling: bg-secondary-subtle/text-secondary-emphasis statt bg-secondary
  → lesbar in Light- und Dark-Mode
- {nodes_online}: Nodes < 15 Min last_seen (DB-Abfrage in get_stats())
- {version}: Bot-Version aus config.yaml via config.get()
Closes #15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 14:31:38 +01:00
ppfeiffer a6988fbb1f fix(stats): eigene Telemetrie aus Pakettypen-Diagramm ausschließen
get_stats() filtert TELEMETRY_APP-Pakete des eigenen Nodes wenn my_node_id
übergeben wird – konsistent mit isSuppressed() im Paket-Log-Frontend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 06:31:07 +01:00
ppfeiffer d6631c1554 feat: Dashboard-Charts-Fix, Nachrichten-Seite, Legende-Hintergrund (fixes #10)
- Fix: Dashboard-Charts (Kanal-Anfragen + Pakettypen) erscheinen nun initial
  korrekt: lastStats gecacht, updateChannelChart nach channels-Event aufgerufen;
  packet_type_breakdown in get_stats() ergänzt (SQL über packets-Tabelle, 24h)
- Fix: Kartenlegende hat jetzt explizite Hintergrundfarben per [data-bs-theme]-
  Selektor (light=#fff, dark=#1e2128) – keine transparente Legende mehr
- Feat: Neue Nachrichten-Seite /messages (User-only) mit Kanal-Farbcodierung
  und Richtungs-Kennzeichnung (empfangen=links/kanalfarbe, gesendet=rechts/grün),
  Channel-Filter-Tabs, Absender-Node-ID, Löschen-Button
- Feat: Dashboard Nodes-Tabelle: neue Spalten RSSI und GPS-Positions-Indikator
- Feat: app.js sidebar-user Klasse für eingeloggte Benutzer (non-admin)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 06:24:33 +01:00
ppfeiffer 9306cce209 feat: v0.6.13 - Version in Navbar, Rolling 24h, Karten-Transparenz
- Version in Navbar aller Seiten (app.js holt /api/stats beim Init)
- Statistiken: Anfragen-Zähler rolling 24h statt Mitternacht-Reset
- Karte: Nodes nach Alter transparent (<24h voll, 24-48h 45%, 48-72h 20%, >72h unsichtbar)
- Legende um Alter-Sektion erweitert

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 17:54:39 +01:00
ppfeiffer 6187bb4419 feat: v0.6.10 - Paket-Log-Seite und größeres Node-Modal
- Neue öffentliche Seite /packets: Echtzeit-Tabelle aller empfangenen
  Meshtastic-Pakete via WebSocket mit Typ-Filter, Pause und Clear
- DB: packets-Tabelle + insert_packet / get_recent_packets
- bot.py: alle Pakete loggen + WS-Broadcast (public)
- webserver.py: /packets Route + /api/packets + initial_packets im WS
- Sidebar: Eintrag 'Pakete' (öffentlich)
- Node-Modal: modal-xl + scrollable, Kartenhöhe 250→300px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 17:17:14 +01:00
ppfeiffer 0232dfccd5 feat: v0.5.8 - Anfragen taeglich zuruecksetzen, Kommando-Badges entfernt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:30:45 +01:00
ppfeiffer 1d768c6921 feat: v0.5.7 - Anfragen pro Kanal mit Kanalnamen im Dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:24:26 +01:00
ppfeiffer 0d6b26f4f8 feat: v0.5.0 - Benutzerverwaltung mit Session-Authentifizierung
Rollen-basiertes Zugriffsystem (public/user/admin), Registrierung mit
E-Mail-Verifikation, bcrypt Passwort-Hashing, Admin-Benutzerverwaltung.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 19:38:17 +01:00
ppfeiffer a1fe0a297d feat: v0.2.3 - Command tracking, active nodes 24h, request breakdown
- Track bot command responses in new `commands` DB table
- Stats cards: total nodes, active 24h, total commands answered
- Full-width command breakdown row with badges per command
- Update bot /stats response

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:26:16 +01:00
ppfeiffer 15955cf8d7 feat: Add Meshtastic bot with web dashboard and live map
Implements full MeshDD-Bot with TCP connection to Meshtastic devices,
SQLite storage for nodes/messages, aiohttp web dashboard with WebSocket
live updates, and Leaflet.js map view with color-coded node markers.
Includes bot commands (!ping, !nodes, !info, !help, !weather, !stats,
!uptime) and automatic version bumping via pre-commit hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:46:32 +01:00