Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Add one Admin page with status, accounts, and the audit log

43e681d8a5d94567aa9530d32b2c89223c1a17f9 · Keenan Nemetz · 5d ago · parent af018ce8

Add one Admin page with status, accounts, and the audit log

Instance administration was split between the Status and Accounts pages,
and the audit log had no browser view at all. The new /admin page gathers
the status tabs, the account roster, and a read-only audit viewer into one
place with a tab for each, and /status, /runners, and /users redirect to
the tab they named so old links keep working.

The audit reader walks the file backwards a chunk at a time, returns the
newest records first, and shows one extra record to know whether an older
page exists. It skips a line it cannot parse rather than failing the page
and refuses a symlink or a non-regular file, as startup already does.

Refs #198 (01M6MK0NNZ2XR1D5TQKNWYT4HN).

server/web/templates/status.html +2−18

@@ -1,19 +1,4 @@
1 {{define "status"}}
2 {{template "header" .}}
3 <div class="page-head status-head">
4 <div class="page-head-main">
5 <h1>Status</h1>
6 <p class="page-sub">Storage, usage, runners, and configuration for this instance. Uptime counted from {{since .Started.Unix}}.</p>
7 </div>
8 </div>
9
10 <nav class="tabs status-tabs" aria-label="Status">
11 <a class="{{if eq .Tab "overview"}}active{{end}}" href="/status"{{if eq .Tab "overview"}} aria-current="page"{{end}}>{{icon "layout-dashboard"}}Overview</a>
12 <a class="{{if eq .Tab "storage"}}active{{end}}" href="/status?tab=storage"{{if eq .Tab "storage"}} aria-current="page"{{end}}>{{icon "hard-drive"}}Storage</a>
13 <a class="{{if eq .Tab "runners"}}active{{end}}" href="/status?tab=runners"{{if eq .Tab "runners"}} aria-current="page"{{end}}>{{icon "server"}}Runners</a>
14 <a class="{{if eq .Tab "configuration"}}active{{end}}" href="/status?tab=configuration"{{if eq .Tab "configuration"}} aria-current="page"{{end}}>{{icon "sliders-horizontal"}}Configuration</a>
15 </nav>
16
1 {{define "status_body"}}
17 2 {{if eq .Tab "overview"}}
18 3 <div class="status-grid">
19 4 <div class="card">
@@ -60,7 +45,7 @@
60 45 </tbody>
61 46 </table>
62 47 </div>
63 <p class="muted">Counts successful HTML pages. Static files, Git traffic, redirects, HTMX fragments, and this status page are excluded. Anonymous views count toward Views; Unique users counts signed-in accounts.</p>
48 <p class="muted">Counts successful HTML pages. Static files, Git traffic, redirects, HTMX fragments, and this Admin page are excluded. Anonymous views count toward Views; Unique users counts signed-in accounts.</p>
64 49 {{end}}
65 50 {{end}}
66 51
@@ -179,5 +164,4 @@ with <code>vole runner --remote ssh://git@&lt;host&gt;</code>. If a job asks for
179 164 <p class="muted">Configuration is unavailable.</p>
180 165 {{end}}
181 166 {{end}}
182 {{template "footer" .}}
183 167 {{end}}