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.

Narrow primaryRowProblem tone return type at the helper

rcourtmanbcc13255d5bd
diff --git a/frontend-modern/src/components/Settings/connectionsTableModel.ts b/frontend-modern/src/components/Settings/connectionsTableModel.ts
index 70ec4bbff1..af4e93820d 100644
--- a/frontend-modern/src/components/Settings/connectionsTableModel.ts
+++ b/frontend-modern/src/components/Settings/connectionsTableModel.ts
@@ -1008,7 +1008,12 @@ export const primaryRowProblem = (
signals: readonly FleetGovernanceSignal[],
): InfrastructureRowProblem | undefined => {
const critical = signals.find((signal) => signal.tone === 'critical');
- const candidate = critical ?? signals.find((signal) => signal.tone === 'warning');
- if (!candidate) return undefined;
- return { label: candidate.label, detail: candidate.detail, tone: candidate.tone };
+ if (critical) {
+ return { label: critical.label, detail: critical.detail, tone: 'critical' };
+ }
+ const warning = signals.find((signal) => signal.tone === 'warning');
+ if (warning) {
+ return { label: warning.label, detail: warning.detail, tone: 'warning' };
+ }
+ return undefined;
};