per-client threshold config

This commit is contained in:
Andreas Wrede
2026-04-01 15:22:42 -04:00
parent 079e84f729
commit 090d341244
7 changed files with 873 additions and 77 deletions
+4 -2
View File
@@ -397,9 +397,11 @@
const level = alert.level.toLowerCase();
const duration = getDuration(alert.since);
// Format value with threshold info if available
// Use formatted message if available, otherwise build from individual fields
let valueText = `Value: <span class="alert-value">${formatValue(alert.last_value)}</span>`;
if (alert.threshold_value !== undefined && alert.threshold_value !== null && alert.operator) {
if (alert.formatted_message) {
valueText += ` <span class="threshold-info">${alert.formatted_message}</span>`;
} else if (alert.threshold_value !== undefined && alert.threshold_value !== null && alert.operator) {
valueText += ` <span class="threshold-info">(threshold: ${alert.operator} ${formatValue(alert.threshold_value)})</span>`;
}