- Rework the admin UI (topbar, sidebar, cards, tables, badges, stat tiles) into a dark theme with a light/dark toggle, matching the visual style requested for the project. - Fix Dockerfile: chown /data to the distroless nonroot uid/gid before the VOLUME declaration so a freshly created named volume is seeded with writable permissions instead of root:root (was causing "unable to open database file" on first run). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
44 lines
2.2 KiB
HTML
44 lines
2.2 KiB
HTML
{{define "streams"}}{{template "header" .}}
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<div class="input-icon">
|
|
<i class="bi bi-search"></i>
|
|
<input type="text" class="form-control" style="width:20rem" placeholder="Search streams…" data-search-target="streamsTable">
|
|
</div>
|
|
<a href="/streams/new" class="btn btn-primary"><i class="bi bi-plus-lg"></i> Add Stream</a>
|
|
</div>
|
|
<div class="card">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0" id="streamsTable">
|
|
<thead class="table-light">
|
|
<tr><th>Protocol</th><th>Listen</th><th>Destination</th><th>PROXY protocol</th><th>Status</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Data}}
|
|
<tr>
|
|
<td><span class="badge text-bg-{{if eq .Protocol "tcp"}}primary{{else}}purple bg-secondary{{end}}">{{.Protocol}}</span></td>
|
|
<td>{{.ListenIP}}:{{.ListenPort}}</td>
|
|
<td>{{.DestinationHost}}:{{.DestinationPort}}</td>
|
|
<td>{{if .ProxyProtocol}}<i class="bi bi-check-lg text-success"></i>{{else}}—{{end}}</td>
|
|
<td>{{if .Enabled}}<span class="badge text-bg-success">enabled</span>{{else}}<span class="badge text-bg-secondary">disabled</span>{{end}}</td>
|
|
<td class="text-end">
|
|
<form method="post" action="/streams/{{.ID}}/toggle" class="d-inline">
|
|
{{template "csrf_field" $.CSRFToken}}
|
|
<button class="btn btn-sm btn-outline-secondary"><i class="bi bi-power"></i></button>
|
|
</form>
|
|
<a href="/streams/{{.ID}}/edit" class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></a>
|
|
<form method="post" action="/streams/{{.ID}}/delete" id="del-stream-{{.ID}}" class="d-inline">
|
|
{{template "csrf_field" $.CSRFToken}}
|
|
</form>
|
|
<button type="button" class="btn btn-sm btn-outline-danger" data-confirm-delete-form="del-stream-{{.ID}}" data-confirm-message="Delete this stream?"><i class="bi bi-trash"></i></button>
|
|
</td>
|
|
</tr>
|
|
{{else}}
|
|
<tr><td colspan="6" class="text-center text-secondary py-4">No streams yet.</td></tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{template "confirm_delete_modal" .}}
|
|
{{template "footer" .}}{{end}}
|