PRE-RELEASE 0.9.2: frontend rename source→collector, tab layout fit

Rename the collector-picker concept to 'collector' throughout the
frontend so it no longer collides with the ipng_source_tag group-by
(which is labelled 'source'). Affects PageData.Collector, the raw
JSON output key, template labels, and tests. Proto Source field is
untouched (wire-level name used by CLI and aggregator too).

Shrink tab padding/gap/font-size and add window:/filter: labels so
the four tab rows (window, filter, collector, tor) line up and 7+
collectors fit on one line at the 1100px body width.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 15:18:40 +02:00
parent e1f8bc5eb4
commit d1a21a7a62
6 changed files with 29 additions and 29 deletions

View File

@@ -10,8 +10,8 @@
* { box-sizing: border-box; }
body { font-family: monospace; font-size: 14px; max-width: 1100px; margin: 2em auto; padding: 0 1.5em; color: #222; }
h1 { font-size: 1.1em; font-weight: bold; margin: 0 0 1em; letter-spacing: 0.05em; }
.tabs { display: flex; gap: 0.3em; margin-bottom: 0.7em; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 0.2em 0.8em; border: 1px solid #aaa; color: #444; }
.tabs { display: flex; gap: 0.2em; margin-bottom: 0.5em; flex-wrap: wrap; align-items: center; }
.tabs a { text-decoration: none; padding: 0.1em 0.5em; border: 1px solid #aaa; color: #444; font-size: 0.9em; }
.tabs a:hover { background: #f0f0f0; }
.tabs a.active { background: #222; color: #fff; border-color: #222; }
.crumbs { margin-bottom: 0.8em; font-size: 0.9em; }
@@ -34,9 +34,7 @@ a:hover { text-decoration: underline; }
.error { color: #c00; border: 1px solid #fbb; background: #fff5f5; padding: 0.7em 1em; margin: 1em 0; border-radius: 3px; }
.nodata { color: #999; margin: 2em 0; font-style: italic; }
footer { margin-top: 2em; padding-top: 0.6em; border-top: 1px solid #e0e0e0; font-size: 0.8em; color: #999; }
.tabs-targets { margin-top: -0.4em; }
.tabs-tor { margin-top: -0.4em; }
.tabs-label { font-size: 0.85em; color: #888; margin-right: 0.2em; align-self: center; }
.tabs-label { font-size: 0.8em; color: #888; margin-right: 0.15em; min-width: 5.5em; }
.filter-form { display: flex; gap: 0.4em; align-items: center; margin-bottom: 0.7em; }
.filter-input { flex: 1; font-family: monospace; font-size: 13px; padding: 0.25em 0.5em; border: 1px solid #aaa; }
.filter-form button { padding: 0.25em 0.8em; border: 1px solid #aaa; background: #f4f4f4; cursor: pointer; font-family: monospace; }

View File

@@ -2,19 +2,21 @@
<h1>nginx-logtail</h1>
<div class="tabs">
<span class="tabs-label">window:</span>
{{- range .Windows}}
<a href="{{.URL}}"{{if .Active}} class="active"{{end}}>{{.Label}}</a>
{{- end}}
</div>
<div class="tabs">
<span class="tabs-label">filter:</span>
{{- range .GroupBys}}
<a href="{{.URL}}"{{if .Active}} class="active"{{end}}>{{.Label}}</a>
{{- end}}
</div>
{{if .Targets}}<div class="tabs tabs-targets">
<span class="tabs-label">source:</span>
<span class="tabs-label">collector:</span>
{{- range .Targets}}
<a href="{{.URL}}"{{if .Active}} class="active"{{end}}>{{.Label}}</a>
{{- end}}
@@ -53,7 +55,7 @@
{{if .Sparkline}}
<div class="sparkline">
<small>{{.Params.WindowS}} trend · by {{.Params.GroupByS}}{{if .Source}} · source: {{.Source}}{{end}}</small>
<small>{{.Params.WindowS}} trend · by {{.Params.GroupByS}}{{if .Collector}} · collector: {{.Collector}}{{end}}</small>
{{.Sparkline}}
</div>
{{end}}
@@ -88,7 +90,7 @@
{{end}}
<footer>
{{- if .Source}}source: {{.Source}} · {{end -}}
{{- if .Collector}}collector: {{.Collector}} · {{end -}}
{{fmtCount .TotalCount}} requests · {{.Params.WindowS}} window · by {{.Params.GroupByS}}
{{- if gt .RefreshSecs 0}} · auto-refresh {{.RefreshSecs}}s{{end}}
</footer>