Commit Graph

23 Commits

Author SHA1 Message Date
patrick 09db060281 Feature: MacOS-Toggle + Raw-Editor im Samba Config-Tab
- Toggle 'Global MacOS Shares' setzt/entfernt fruit-Parameter automatisch
  (fruit:encoding=native, fruit:metadata=stream, fruit:zero_file_id=yes,
  fruit:nfs_aces=no) via net conf setparm
- Raw-Textarea zeigt alle globalen Parameter direkt editierbar (key = value)
- Tabellen-Ansicht durch Raw-Editor ersetzt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 22:34:07 +02:00
patrick ab75f462cc 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 5a71b559ca 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 bce8de36aa 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 b85381759b 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 f59da0acc0 Dokumentation: Session-Eintrag DEVLOG
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 14:59:08 +02:00
patrick 2fdff0407f 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 d9c77e0b46 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 5a26f3d300 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 a187b625bc 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 448026d91a 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 b69ae4051a README.md aktualisiert 2026-04-22 02:01:01 +02:00
patrick c561512460 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 83375ceef1 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 55ae3b79ae 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 dc242d5839 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 249b060400 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 a376e9e0c9 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 523a3dfbf6 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 be8b8cf68c 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 eec74626d0 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 8402053dd8 .env.local~ gelöscht 2026-04-22 01:00:43 +02:00
Claude Code 6d74d874b6 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