display tag fro alterts, cleanup udp

This commit is contained in:
Andreas Wrede
2026-04-01 11:49:55 -04:00
parent dd23d9d163
commit 079e84f729
15 changed files with 277 additions and 540 deletions
+7 -1
View File
@@ -397,6 +397,12 @@
const level = alert.level.toLowerCase();
const duration = getDuration(alert.since);
// Format value with threshold info if available
let valueText = `Value: <span class="alert-value">${formatValue(alert.last_value)}</span>`;
if (alert.threshold_value !== undefined && alert.threshold_value !== null && alert.operator) {
valueText += ` <span class="threshold-info">(threshold: ${alert.operator} ${formatValue(alert.threshold_value)})</span>`;
}
return `
<div class="alert-item ${level}">
<div class="alert-main">
@@ -406,7 +412,7 @@
</div>
<div class="alert-metric">${alert.metric_path}</div>
<div class="alert-details">
<span>Value: <span class="alert-value">${formatValue(alert.last_value)}</span></span>
<span>${valueText}</span>
<span class="alert-duration">Active for ${duration}</span>
</div>
</div>