Say on each node card whose containers the tiers are, since they are the other host's

This commit is contained in:
Gmer4Lfe
2026-08-22 09:49:43 -04:00
parent 1c38abe1d0
commit b17cc3a09d
+20
View File
@@ -55,6 +55,15 @@ require_once dirname(__DIR__) . '/include/ai_chat.php';
if (vv_ai_ui_on()) vv_ai_chat_assets(); if (vv_ai_ui_on()) vv_ai_chat_assets();
?> ?>
<style> <style>
/* Tier banner — states whose containers these are, on a card headed by a different host.
The node card and the Fallback coverage card below it face OPPOSITE directions: this lists
what THIS node starts for the OTHER one, the coverage card edits what the other starts for us.
Both are correct and neither is guessable, so each says so in as many words. */
.vv-fb-tierhdr { display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;
background:#1a1200;border:1px solid #3a2800;border-left:3px solid #ffb74d;
border-radius:4px;padding:6px 9px;margin-bottom:8px; }
.vv-fb-tierhdr-t { font-size:12px;font-weight:700;color:#ffb74d;letter-spacing:.01em; }
.vv-fb-tierhdr-s { font-size:10px;color:#7a6038; }
/* ── Fallback coverage ── */ /* ── Fallback coverage ── */
/* One continuum, worst outcome to best: never comes back → 24h → 12h → 4h → immediate → never /* One continuum, worst outcome to best: never comes back → 24h → 12h → 4h → immediate → never
goes down at all. The colour answers "how long am I without this if the partner takes over", goes down at all. The colour answers "how long am I without this if the partner takes over",
@@ -585,6 +594,16 @@ function _nodeCard(node, data) {
? `<span class="vv-fb-sv">${cov.id} <span style="color:#3a3a3a;">(${vvEscHtml(cov.hostname)})</span></span>` ? `<span class="vv-fb-sv">${cov.id} <span style="color:#3a3a3a;">(${vvEscHtml(cov.hostname)})</span></span>`
: '<span class="vv-fb-sv dim">nothing configured</span>'; : '<span class="vv-fb-sv dim">nothing configured</span>';
// Whose containers these are. The list is read from the COVERED host's conf and describes
// that host's containers — so a card headed HOST2 is listing HOST1's services. Without saying
// so, the obvious reading is the wrong one.
const tierHdr = cov
? `<div class="vv-fb-tierhdr">
<span class="vv-fb-tierhdr-t">Fallback containers for ${vvEscHtml(cov.id)}</span>
<span class="vv-fb-tierhdr-s">${node.is_me ? 'this host' : vvEscHtml(node.id)} starts these when ${vvEscHtml(cov.id)} goes dark</span>
</div>`
: '';
const tierSection = cov const tierSection = cov
? _tierSection(cov, active, cov.delays) ? _tierSection(cov, active, cov.delays)
: '<div style="color:#3a3a3a;font-size:11px;">No coverage configured</div>'; : '<div style="color:#3a3a3a;font-size:11px;">No coverage configured</div>';
@@ -643,6 +662,7 @@ function _nodeCard(node, data) {
</div> </div>
<hr class="vv-fb-sep"> <hr class="vv-fb-sep">
${tierHdr}
${tierSection} ${tierSection}
${tierWarn} ${tierWarn}