Update notification service

This commit is contained in:
MacRimi
2026-03-25 23:30:00 +01:00
parent e37469ac2b
commit 66892f69ce
5 changed files with 9 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ cp "$SCRIPT_DIR/flask_proxmenux_routes.py" "$APP_DIR/usr/bin/" 2>/dev/null || ec
cp "$SCRIPT_DIR/flask_terminal_routes.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ flask_terminal_routes.py not found"
cp "$SCRIPT_DIR/hardware_monitor.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ hardware_monitor.py not found"
cp "$SCRIPT_DIR/proxmox_storage_monitor.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ proxmox_storage_monitor.py not found"
cp "$SCRIPT_DIR/flask_script_runner.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "<EFBFBD><EFBFBD><EFBFBD> flask_script_runner.py not found"
cp "$SCRIPT_DIR/flask_script_runner.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo " flask_script_runner.py not found"
cp "$SCRIPT_DIR/security_manager.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ security_manager.py not found"
cp "$SCRIPT_DIR/flask_security_routes.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ flask_security_routes.py not found"
cp "$SCRIPT_DIR/notification_manager.py" "$APP_DIR/usr/bin/" 2>/dev/null || echo "⚠️ notification_manager.py not found"

View File

@@ -1135,7 +1135,7 @@ class HealthPersistence:
# This avoids redundant subprocess calls and ensures immediate detection
# when the user adds new ZFS/LVM storage via Proxmox.
# ─── User Settings ────────────────────────<EFBFBD><EFBFBD>─────────────────
# ─── User Settings ─────────────────────────────────────────
def get_setting(self, key: str, default: Optional[str] = None) -> Optional[str]:
"""Get a user setting value by key."""
@@ -1325,7 +1325,7 @@ class HealthPersistence:
print(f"[HealthPersistence] Error recording UNKNOWN persistent: {e}")
# ───────────────────────────────────────────────────────────────
# ────────────────────────────────────────────<EFBFBD><EFBFBD><EFBFBD>───────────────────
# Disk Observations API
# ────────────────────────────────────────────────────────────────

View File

@@ -1841,7 +1841,7 @@ class NotificationManager:
notification_manager = NotificationManager()
# ─── CLI Interface ───────────────────────────────────────<EFBFBD><EFBFBD><EFBFBD>────────
# ─── CLI Interface ───────────────────────────────────────────────
def _print_result(result: Dict, as_json: bool):
"""Print CLI result in human-readable or JSON format."""

View File

@@ -1612,7 +1612,7 @@ A blank line must be completely empty — no emoji, no spaces.
💥 Disk I/O error on /dev/sda: 1 sector currently unreadable (pending)
🏷️ Container CT 9005: ❌ failed to start
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Container CT 9004: ❌ failed to start
🏷 Container CT 9004: ❌ failed to start
🏷️ Container CT 9002: ❌ failed to start"""

View File

@@ -151,6 +151,9 @@ class ProxmoxStorageMonitor:
storage_type = resource.get('plugintype', 'unknown')
status = resource.get('status', 'unknown')
# Debug: log storage status during startup
print(f"[v0] Storage '{name}': status={status}, maxdisk={resource.get('maxdisk', 0)}, node={node}")
try:
total = int(resource.get('maxdisk', 0))
used = int(resource.get('disk', 0))
@@ -183,6 +186,7 @@ class ProxmoxStorageMonitor:
storage_info['status'] = 'error'
storage_info['status_detail'] = 'unavailable' if total == 0 else status
unavailable_storages.append(storage_info)
print(f"[v0] Storage '{name}' marked UNAVAILABLE: total={total}, status={status}")
else:
storage_info['status'] = 'active'
available_storages.append(storage_info)