Add timed mutes so a temporary problem stops needing a permanent exemption
Every existing exemption lasts until someone remembers to undo it, and nobody does — Healarr has sat in a pressure list since it was uninstalled and seven ignore entries name containers that are gone. A mute states when it ends and then ends, capped by WATCHDOG_MUTE_MAX_HOURS so temporary is enforced rather than intended. Applied where IGNORE_MAP is built, so all five check sites inherit it, and shown with its countdown because an invisible suppression is the thing being fixed.
This commit is contained in:
@@ -514,6 +514,22 @@ function _dockerCard(node, cfg) {
|
||||
}
|
||||
}
|
||||
|
||||
// Shown with the time left, not just the name. A mute whose remaining time is invisible is
|
||||
// indistinguishable from the permanent exemptions it was built to replace — the countdown is
|
||||
// the entire difference, so it is the part that has to be on screen.
|
||||
const mutes = st.mutes || {};
|
||||
const muteNames = Object.keys(mutes);
|
||||
const muteHtml = muteNames.length === 0
|
||||
? '<div style="color:#333;font-size:11px;">none</div>'
|
||||
: `<div class="vv-wd-pill-row">${muteNames.map(n => {
|
||||
const m = mutes[n];
|
||||
const left = m.left >= 3600 ? Math.round(m.left / 3600) + 'h'
|
||||
: m.left >= 60 ? Math.round(m.left / 60) + 'm'
|
||||
: m.left + 's';
|
||||
return `<span class="vv-wd-pill warn" title="${vvEscAttr(m.reason || 'no reason given')}">`
|
||||
+ `${vvEscHtml(n)} · ${left}</span>`;
|
||||
}).join('')}</div>`;
|
||||
|
||||
let skipHtml = '';
|
||||
if (skiplist.length === 0) {
|
||||
skipHtml = '<div style="color:#333;font-size:11px;">empty</div>';
|
||||
@@ -548,6 +564,9 @@ function _dockerCard(node, cfg) {
|
||||
<div class="vv-wd-sec">Skip list</div>
|
||||
${skipHtml}
|
||||
<hr class="vv-wd-sep">
|
||||
<div class="vv-wd-sec">Muted</div>
|
||||
${muteHtml}
|
||||
<hr class="vv-wd-sep">
|
||||
<div class="vv-wd-sec">Restarts (24h)</div>
|
||||
${restartHtml}
|
||||
</div>`;
|
||||
|
||||
Reference in New Issue
Block a user