Removes the standalone toolbar severity <select> and instead builds a second <thead> row in JS with a text input (debounced 300 ms) per column and a <select> for icon-only columns (severity_icon, status). All active column filters apply together (AND logic). Adds data-col attributes to <th> elements so JS can identify columns by name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
165 lines
5.8 KiB
HTML
165 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{ .Title }}</title>
|
|
<link rel="stylesheet" href="/static/view.css">
|
|
<script defer src="/static/view.js"></script>
|
|
</head>
|
|
<body>
|
|
<header class="page-header">
|
|
<h1>{{ .Title }}</h1>
|
|
{{ if .DownloadArchiveURL }}
|
|
<div class="header-actions">
|
|
<a class="header-action" href="{{ .DownloadArchiveURL }}">{{ if .DownloadArchiveLabel }}{{ .DownloadArchiveLabel }}{{ else }}Download archive{{ end }}</a>
|
|
</div>
|
|
{{ end }}
|
|
</header>
|
|
|
|
<main class="page-main">
|
|
{{ if .NoticeTitle }}
|
|
<section class="notice-panel">
|
|
<h2>{{ .NoticeTitle }}</h2>
|
|
<p>{{ .NoticeBody }}</p>
|
|
</section>
|
|
{{ end }}
|
|
|
|
{{ if .HasSnapshot }}
|
|
<section class="meta-panel">
|
|
<h2>Snapshot Metadata</h2>
|
|
<table class="kv-table">
|
|
<tbody>
|
|
{{ range .Meta }}
|
|
<tr>
|
|
<th>{{ .Key }}</th>
|
|
<td>{{ .Value }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<div class="sections-grid">
|
|
{{ range .Sections }}
|
|
<section class="section-card {{ if or (eq .ID "board") (eq .ID "firmware") }}section-card-half{{ else }}section-card-full{{ end }}" id="{{ .ID }}">
|
|
<h2>{{ .Title }}</h2>
|
|
|
|
{{ if eq .Kind "object" }}
|
|
<table class="kv-table">
|
|
<tbody>
|
|
{{ range .Rows }}
|
|
<tr>
|
|
<th>{{ .Key }}</th>
|
|
<td>
|
|
{{ range joinLines .Value }}
|
|
<div>{{ . }}</div>
|
|
{{ end }}
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{ end }}
|
|
|
|
{{ if eq .Kind "table" }}
|
|
{{ $section := . }}
|
|
<div class="table-block table-filterable">
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
{{ range .Columns }}
|
|
<th data-col="{{ . }}"{{ if or (eq . "status") (eq . "severity_icon") }} class="status-column"{{ end }}{{ if eq . "status" }} aria-label="status"{{ end }}{{ if eq . "severity_icon" }} aria-label="severity"{{ end }}>{{ if and (ne . "status") (ne . "severity_icon") }}{{ . }}{{ end }}</th>
|
|
{{ end }}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Items }}
|
|
<tr data-severity-row="true" data-severity="{{ .Severity }}">
|
|
{{ $row := . }}
|
|
{{ range $section.Columns }}
|
|
<td{{ if or (eq . "status") (eq . "severity_icon") }} class="status-column"{{ end }}>
|
|
{{ $value := index $row.Cells . }}
|
|
{{ if eq . "status" }}
|
|
<span class="status-badge {{ statusClass $value }}" role="img" aria-label="{{ $value }}" title="{{ $value }}"></span>
|
|
{{ else if eq . "severity_icon" }}
|
|
<span class="status-badge {{ severityClass $value }}" role="img" aria-label="{{ $value }}" title="{{ $value }}"></span>
|
|
{{ else }}
|
|
{{ range joinLines $value }}
|
|
<div>{{ . }}</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</td>
|
|
{{ end }}
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="table-filter-empty" hidden>No rows match the active filters.</p>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ if eq .Kind "grouped_tables" }}
|
|
{{ range .Groups }}
|
|
<div class="table-group">
|
|
<h3>{{ .Title }}</h3>
|
|
{{ $group := . }}
|
|
<div class="table-block table-filterable">
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
{{ range .Columns }}
|
|
<th data-col="{{ . }}"{{ if or (eq . "status") (eq . "severity_icon") }} class="status-column"{{ end }}{{ if eq . "status" }} aria-label="status"{{ end }}{{ if eq . "severity_icon" }} aria-label="severity"{{ end }}>{{ if and (ne . "status") (ne . "severity_icon") }}{{ . }}{{ end }}</th>
|
|
{{ end }}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Items }}
|
|
<tr data-severity-row="true" data-severity="{{ .Severity }}">
|
|
{{ $row := . }}
|
|
{{ range $group.Columns }}
|
|
<td{{ if or (eq . "status") (eq . "severity_icon") }} class="status-column"{{ end }}>
|
|
{{ $value := index $row.Cells . }}
|
|
{{ if eq . "status" }}
|
|
<span class="status-badge {{ statusClass $value }}" role="img" aria-label="{{ $value }}" title="{{ $value }}"></span>
|
|
{{ else if eq . "severity_icon" }}
|
|
<span class="status-badge {{ severityClass $value }}" role="img" aria-label="{{ $value }}" title="{{ $value }}"></span>
|
|
{{ else }}
|
|
{{ range joinLines $value }}
|
|
<div>{{ . }}</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</td>
|
|
{{ end }}
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="table-filter-empty" hidden>No rows match the active filters.</p>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</section>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ if .Error }}
|
|
<div role="alert" class="error-box">{{ .Error }}</div>
|
|
{{ end }}
|
|
|
|
{{ if not .HasSnapshot }}
|
|
<section class="empty-panel">
|
|
<h2>Snapshot Viewer</h2>
|
|
<p>This page renders one Reanimator snapshot provided by the embedding application.</p>
|
|
</section>
|
|
{{ end }}
|
|
</main>
|
|
</body>
|
|
</html>
|