Commit Graph

23 Commits

Author SHA1 Message Date
patrick 1dd310dbb2 Fix: Snapshots-Tabelle leer - Top-Level-Datasets initial expandiert
Sub-Datasets (tank/share) waren initial eingeklappt, dadurch waren
alle Zeilen unsichtbar. Beim Laden werden jetzt alle Top-Level-Datasets
automatisch expandiert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:13:28 +02:00
patrick 0d260e32e8 chore: Screenshots-Ordner aus Git-Tracking ausschließen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 21:58:04 +02:00
patrick 99c62b82ad Fix: Snapshot-Datum 'Invalid Date' - Feld created statt creation
Backend liefert das Snapshot-Erstellungsdatum als 'created' (Unix-Timestamp),
das Frontend-Interface/Rendering erwartete aber 'creation'. Feld angeglichen
und creation_datetime im Interface ergänzt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 21:31:57 +02:00
patrick b12dfe64e4 Fix: zpool list Spalten-Indizes für Capacity/Fragmentation
CAP und FRAG wurden um eine Spalte verschoben gelesen (DEDUP statt CAP,
CAP statt FRAG). Korrekt: FRAG=parts[6], CAP=parts[7]. Prozentzeichen
ergänzt, da -p die Werte ohne % liefert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:04:36 +02:00
patrick 4e4c0321c9 Dokumentation: Session-Eintrag DEVLOG
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:59:08 +02:00
patrick 340e71e67d Dokumentation: DEVLOG-Updates auf aktuellen Stand
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick cd03e2cf9c Konfigurierbares CORS per ZMB_CORS_ORIGINS + dynamische Frontend-URL
- main.py: CORS-Origins aus ZMB_CORS_ORIGINS (kommagetrennt), Default "*"
- allow_credentials automatisch aktiv bei konkreten Origins, aus bei "*"
- Root-Endpoint liefert Frontend-URL dynamisch via request.base_url
- keine hartkodierten IPs mehr im Anwendungscode
- Doku in CLAUDE.md und systemd-Unit ergaenzt

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick 40259ec93c Add: next.config.ts für Static Export
- output: export für statischen HTML Export in Next.js 14
- Images optimiert für Export
- ESLint Warnings während Build ignorieren

Ermöglicht npm run build → out/ für nginx Deployment

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick f55a5f34a7 Fix: Identities Group Management - bessere Fehlermeldungen
- add_user_to_group: Exception werfen mit stderr Nachricht
- remove_user_from_group: Exception werfen mit stderr Nachricht
- text=True für subprocess für besseres Error Handling
- Router aktualisiert um Fehlermeldungen an Frontend weiterzugeben
- Benutzer sehen jetzt detaillierte Fehlermeldungen beim Gruppe-Entfernen

Behebt: 'Failed to remove user from group' verschluckt die echte Fehlermeldung

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick 2fc68a7cab Fix: Navigator Permissions - absolute Pfade für chmod/chown
- /bin/chmod statt chmod (line 435)
- /bin/chown statt chown (line 476)
- /bin/chmod -R statt chmod -R für recursive (line 514)

Behebt: 'Failed to save permissions' Fehler beim Ändern von Dateiberechtigungen

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick 88a710f136 Dokumentation: Data Persistence für System- und Samba-User
- Erklärung: Lokale und erstellte Samba-User bleiben über App-Updates erhalten
- Deployment korrigiert: PAM-User mit useradd erstellen statt nicht-existierendem auth_service.add_user()
- Neues Kapitel "Data Persistence" mit Details zu:
  - System-Benutzer (PAM, /etc/passwd)
  - Samba-User (TDB/Registry)
  - Samba Shares & Config
  - NFS Exports
  - ZFS Pools (Hardware-level persistence)
- Klarstellung in "Important Constraints": Benutzer überleben App-Redeployments
- Port korrigiert: 9090 → 8090

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-04 14:58:50 +02:00
patrick 696cb664b1 README.md aktualisiert 2026-04-22 02:01:01 +02:00
patrick ea6b2503f2 Hinzufügen: INSTALLATION.md mit umfassender Installationsanleitung
- Systemanforderungen und Abhängigkeiten
- Schritt-für-Schritt Backend/Frontend Setup
- Systemd Service Konfiguration
- Nginx Reverse Proxy Setup mit SSL
- Samba Registry Konfiguration
- Troubleshooting und Performance-Tipps
- Sicherheitsrichtlinien

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-22 01:59:28 +02:00
patrick 71164ddb9c Update /file-sharing page to support new Samba parameters
Features:
- Display Samba config in key=value format
- Support adding new parameters (one per line)
- Parse and apply changes via net conf setparm
- Comments (# and ;) are ignored
- Auto-reload after save to show applied changes

Format: key = value (one per line)

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:35:28 +02:00
patrick 07cf45a481 Add editable Samba global configuration with net conf setparm
Backend:
- Use 'net conf setparm' to update individual parameters
- Accept dictionary of key-value pairs in API

Frontend:
- Add Edit/Cancel/Save buttons to Samba Config tab
- Inline editing of configuration values
- Save changes back to registry

Changes are applied immediately via net conf setparm.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:31:14 +02:00
patrick a373378691 Fix: Use full path for 'net' command in Samba config reading
subprocess needs full path to executable when PATH is not set.
Use /usr/bin/net instead of 'net'.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:22:05 +02:00
patrick 87e2decca5 Update service file to use /opt/zmb-webui paths
zmb-webui is the new naming convention - update all paths accordingly.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:14:32 +02:00
patrick e5afa47ccb Fix systemd service paths for correct backend location
Use /opt/zfs-manager/backend and /opt/zfs-manager/venv paths.
Simplify service configuration for reliability.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:12:44 +02:00
patrick afa74d4557 Add Samba registry setup script for initial configuration
Script initializes Samba to use registry-based configuration:
- Creates minimal smb.conf with 'include = registry'
- Imports ZMB-optimized global settings into registry
- Configures shadow copy, ZFS integration, macOS support
- Restarts Samba services

Run on new systems with: sudo bash deploy/setup-samba-registry.sh

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:09:24 +02:00
patrick 0504b5b880 Read Samba config from registry instead of smb.conf
Use 'net conf list' to read global config parameters from Samba registry.
This is more reliable than parsing smb.conf, especially when using
'include = registry' in smb.conf.

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:08:15 +02:00
patrick 52b9c02264 Improve Samba Global Configuration display in WebUI
Backend:
- Parse global config into structured key-value pairs
- Return parameters array instead of raw text
- Better handling of comments and empty lines

Frontend:
- Add 'Samba Config' tab to shares page
- Display config parameters in readable table format
- Color-code parameter names for clarity
- Add getSambaConfig() method to API client

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 01:01:58 +02:00
patrick 8dbf0e44df .env.local~ gelöscht 2026-04-22 01:00:43 +02:00
Claude Code 92bed208e0 ZMB Webui: Complete Project – Rebrand & Initial Clean Commit
ARCHITECTURE
============
Backend: FastAPI + uvicorn (port 8000)
  - JWT authentication with PAM system users
  - ZFS CLI wrapper with caching (30-60s TTL)
  - WebSocket pool status broadcaster (30s interval)
  - Services: auth, zfs_runner, file_manager, shares, identities, system_info
  - Routers: pools, datasets, snapshots, shares, identities, navigator, system

Frontend: Next.js 15 + TypeScript (static export)
  - Incremental Static Regeneration (ISR) for weak hardware
  - Type-safe API client (lib/api.ts)
  - Dark mode + custom Tailwind theme
  - Pages: Dashboard, Login, Snapshots, Datasets, Shares, etc.

DEPLOYMENT
==========
Test Target: 192.168.1.179:8090 (Debian LXC)
Production: 10.66.120.3:9090 (Raspberry Pi 4GB ARM64)
Updater: Automated Gitea-based deployment (update-test.sh, update-pi.sh)

FEATURES COMPLETED
==================
Phase 3a: Dashboard Quick Stats (System, CPU, Memory, Storage)
  - Real-time stats with color-coded progress bars
  - Responsive grid layout (mobile: 1, tablet: 2, desktop: 4 columns)
  - ISR-optimized for fast loads on weak hardware

REBRANDING
==========
Renamed throughout:
  - Project: 'ZFS Manager' → 'ZMB Webui'
  - Services: 'zfs-manager' → 'zmb-webui'
  - Systemd units: zfs-manager-backend → zmb-webui-backend
  - Configuration files and documentation

Co-Authored-By: Patrick <patrick@perlbach24.de>
2026-04-22 00:43:05 +02:00