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.

#199

One Admin page for status, accounts, and the audit log

merged · by keenan 4d ago · merged into main at ea21f923 by keenan 4d ago

keenan opened this 4d ago

Why

An instance admin had two separate admin surfaces and no way to read the audit log in the browser. This puts instance state, the account roster, and the record of privileged actions on one page, and keeps the old URLs working.

What changed

  • /admin is the instance-admin surface, gated before any tab is read. Its tabs are Overview, Storage, Runners, Configuration, Accounts, and Audit log.
  • The status tabs and the accounts roster are sections of that page now, not copies: the handlers fill one view, and the templates keep their existing markup.
  • /status, /runners, and /users redirect to the tab they named. /users/<name> still serves the account detail page.
  • The Audit log tab pages newest first. internal/audit gained Parse and Tail, which read the file backwards in chunks and ask for one extra record to know whether an older page exists. A missing file is an empty log; a malformed line is skipped; a symlink or non-regular file is refused.
  • The admin surface is excluded from page-view counts, including the new tab, so the metric still measures reading rather than administration.
  • The audit tab is sent with Cache-Control: no-store, and detail text is escaped by the template.
  • Docs and tests updated.

Checks

./vole workflow run verify passes: format, vet, build, licenses, govulncheck, packages, markdown links, and the race test suite.

Closes #198.

Discussion (4)

keenan 4d ago

Follow-up pushed in 0db980e: the Overview tab now repeats the head of the other tabs. It shows the account mix (active people, bots, instance admins, retired), the six newest audit records with their detail and a link into the full log, and the configuration warnings (development switches, or browser sign-in being disabled). Sections that have nothing to report are omitted.

./vole workflow run verify passes again, with tests for the counts, the recent-activity limit, the warning list, and its absence on a clean configuration.

keenan 4d ago

Pushed 9a2a270: the overview is a single row of metric cards now — storage used, free space, users, repositories, and page views. LFS totals moved back to the Storage tab, and the four account cards became the note under the Users card (“1 person · 1 bot · 1 admin · 1 retired”). Queue and runner counts stay on the line below the row.

./vole workflow run verify passes.

keenan 4d ago

Pushed f11854f: the queue/runner line under the metric cards is gone, and the overview no longer reads runner state it stopped displaying. ./vole workflow run verify passes.

keenan 4d ago

Pushed ea21f92: account management moved to the users directory.

  • The Admin Accounts tab no longer renders the whole roster. It keeps the invite form and the bot form, and links to /u for anything that changes an existing account.
  • /u already pages at 50, searches, filters by status, and sorts, so it scales. An instance admin now gets a Manage action on each row (header and cell are only rendered for an admin) that opens /users/<name>.
  • The account page keeps its own instance-admin gate, so the column is presentation only; a non-admin who types the URL still gets a 404.
  • Removed the roster query (one session listing per account) that the tab used to do on every load.

./vole workflow run verify passes, including a test that a non-admin sees no Manage column and that an admin does.