Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Fix backup UX and proxy config dedupe

rcourtmanc1b490b11f53
diff --git a/frontend-modern/src/components/Backups/UnifiedBackups.tsx b/frontend-modern/src/components/Backups/UnifiedBackups.tsx
index f624bcee3f..b8bf65d431 100644
--- a/frontend-modern/src/components/Backups/UnifiedBackups.tsx
+++ b/frontend-modern/src/components/Backups/UnifiedBackups.tsx
@@ -167,13 +167,16 @@ const UnifiedBackups: Component = () => {
const pve = pveBackupsState();
const pbs = pbsBackupsState();
const pmg = pmgBackupsState();
- return (
- !(pve?.guestSnapshots?.length ?? 0) &&
- !(pve?.storageBackups?.length ?? 0) &&
- !(pbs?.length ?? 0) &&
- !(pmg?.length ?? 0) &&
- !state.pbs?.length
- );
+ const hasData =
+ (pve?.guestSnapshots?.length ?? 0) > 0 ||
+ (pve?.storageBackups?.length ?? 0) > 0 ||
+ (pbs?.length ?? 0) > 0 ||
+ (pmg?.length ?? 0) > 0;
+ if (hasData) {
+ return false;
+ }
+ const pollingCycles = state.stats?.pollingCycles ?? 0;
+ return pollingCycles === 0;
});
// Normalize all backup data into unified format
diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh
index 2af87ae594..b925da6104 100755
--- a/scripts/install-sensor-proxy.sh
+++ b/scripts/install-sensor-proxy.sh
@@ -118,19 +118,14 @@ from pathlib import Path
path = Path(sys.argv[1])
lines = path.read_text().splitlines()
-if not lines:
- path.write_text('')
- exit()
-
out = []
pending = []
skip = False
def flush_pending():
- global pending
if pending:
out.extend(pending)
- pending = []
+ pending.clear()
i = 0
while i < len(lines):
@@ -138,14 +133,14 @@ while i < len(lines):
stripped = line.lstrip()
if skip:
- indent = len(line) - len(stripped)
- if indent > 0 or stripped.startswith('#'):
+ # Keep skipping until a non-indented, non-comment line appears
+ if stripped == '' or stripped.startswith('#') or stripped.startswith('-') or line.startswith((' ', '\t')):
i += 1
continue
skip = False
if stripped.startswith('allowed_nodes:'):
- pending = []
+ pending.clear()
skip = True
i += 1
continue
@@ -160,7 +155,7 @@ while i < len(lines):
i += 1
flush_pending()
-path.write_text('\n'.join(out) + '\n')
+path.write_text('\n'.join(out) + ('\n' if out else ''))
PY
else
# Fallback: truncate the file to remove duplicates if python3 is unavailable