1d94b1a9e9
- Auto-refresh: the 60s reload fires only while a live tab is active
(nav data-live-tabs="overview,applications,events,host") AND no form is
dirty (delegated input/change listener; never reset — a reload clears it).
Skipped ticks reschedule; a muted (paused) hint shows next to the toggle on
non-live tabs / dirty forms. Toggle, localStorage key, 60s cadence, and
default-on behavior unchanged. The refresh script resolves the legacy
settings→edit hash alias like the tabs script.
- Rider 4a: every template's stylesheet link is /style.css?v={{hubVersion}}
(the v0.47.0 gotcha: max-age=3600 served stale styling for up to an hour
after a deploy). Red-proof run: a reverted bare link fails the test.
- Rider 4b: CLAUDE.md standing rule — never git add -A in this repo
(the 146d165 sweep incident); explicit paths + pull-rebase + one writing
session per clone.
- Tests: Group C structural pins (attribute read, dirty listeners, alias x2,
hint element, cadence/key survivors) + Group D cache-bust over six pages.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZc5w5jDhFLv6qDC32KN5v
52 lines
2.6 KiB
HTML
52 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{.Tail.AppName}} log tail — Felhom Hub</title>
|
|
<link rel="stylesheet" href="/style.css?v={{hubVersion}}">
|
|
</head>
|
|
<body>
|
|
{{template "icon_sprite"}}
|
|
<div class="container">
|
|
<header>
|
|
<h1>Felhom <span>Hub</span></h1>
|
|
<nav class="nav-links">
|
|
<a href="/" class="nav-link">Dashboard</a>
|
|
<a href="/configs" class="nav-link active">Customers</a>
|
|
<a href="/apps" class="nav-link">Apps</a>
|
|
<a href="/hosts" class="nav-link">Hosts</a>
|
|
<a href="/offsite" class="nav-link">Offsite</a>
|
|
<a href="/configuration" class="nav-link">Configuration</a>
|
|
</nav>
|
|
</header>
|
|
|
|
<a href="/customers/{{.CustomerID}}" class="back-link">← {{.CustomerID}}</a>
|
|
|
|
<section class="card" style="margin-top: 1rem;">
|
|
<div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;">
|
|
<h2 style="margin: 0;">Log tail: <span style="font-family: var(--font-mono);">{{.Tail.AppName}}</span></h2>
|
|
<a href="/customers/{{.CustomerID}}/log-tail/{{.Tail.ID}}?download=1" class="btn btn-sm">Download .log</a>
|
|
</div>
|
|
<p class="text-muted" style="margin-top: 0.25rem; font-size: 0.85rem;">
|
|
Collected on the box at {{.Tail.CollectedAt.Format "2006-01-02 15:04:05"}} UTC ({{timeAgo .Tail.CollectedAt}})
|
|
· {{len .Tail.Lines}} lines, ordered as emitted · redacted controller-side before shipping.
|
|
</p>
|
|
{{if .Tail.Lines}}
|
|
<ol class="log-lines" style="font-family: var(--font-mono); font-size: 0.8rem; background: var(--bg-0); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 0.5rem 0.5rem 0.5rem 4rem; margin: 0.5rem 0 0; overflow-x: auto;">
|
|
{{range .Tail.Lines}}
|
|
<li style="white-space: pre-wrap; word-break: break-word; color: var(--text-1);">{{.}}</li>
|
|
{{end}}
|
|
</ol>
|
|
{{else}}
|
|
<p class="text-muted">The tail arrived empty (the container produced no log lines).</p>
|
|
{{end}}
|
|
</section>
|
|
|
|
<footer style="margin-top: 2rem; color: var(--text-muted); font-size: 0.8rem; text-align: center;">
|
|
Felhom Hub <span style="font-family: var(--font-mono)">{{hubVersion}}</span>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|