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 the status page and language-aware file icons
09b15120717116d07d0227444bdb2d2a499164b1 · Keenan Nemetz · 15d ago · parent b355db72
Add the status page and language-aware file icons GET /status is the human version of /healthz: store checks, account/repository counts, queue depth, runners seen recently, LFS availability, and uptime, with a footer link. /healthz stays a plain-text probe for scripts. The code tree, directory list, and file search now choose an icon and language colour from the file extension, with build files and go.mod handled by name. Both are presentation only; unknown files keep the generic icon.
server/web/web.go +7−1
| @@ -50,6 +50,9 @@ type Web struct { | |||
| 50 | 50 | DeleteRepo func(name string) error | |
| 51 | 51 | Logger func(format string, args ...any) | |
| 52 | 52 | ||
| 53 | // Started is the process start, shown on the status page as uptime. | ||
| 54 | Started time.Time | ||
| 55 | |||
| 53 | 56 | // sem bounds compressed archive streams; see releases.go. | |
| 54 | 57 | sem chan struct{} | |
| 55 | 58 | ||
| @@ -66,7 +69,8 @@ func New(repos *repo.Store, ix *index.Store, ident *identity.Store, rs *runs.Sto | |||
| 66 | 69 | return nil, err | |
| 67 | 70 | } | |
| 68 | 71 | w := &Web{Repos: repos, Index: ix, Ident: ident, Runs: rs, Cfg: cfg, | |
| 69 | Auth: auth, Ceremonies: newCeremonyStore(), sem: make(chan struct{}, archiveConc)} | ||
| 72 | Auth: auth, Ceremonies: newCeremonyStore(), Started: time.Now().UTC(), | ||
| 73 | sem: make(chan struct{}, archiveConc)} | ||
| 70 | 74 | // The templates are parsed after the Web exists so the roster-backed helper | |
| 71 | 75 | // below can be a method: metadata files carry account names and approvals are | |
| 72 | 76 | // keyed by ids, and a page should show the display label for either. | |
| @@ -90,6 +94,8 @@ func New(repos *repo.Store, ix *index.Store, ident *identity.Store, rs *runs.Sto | |||
| 90 | 94 | "pathurl": pathURL, | |
| 91 | 95 | "pathjoin": joinPath, | |
| 92 | 96 | "parentpath": parentPath, | |
| 97 | "fileicon": fileIcon, | ||
| 98 | "fileclass": fileClass, | ||
| 93 | 99 | }).ParseFS(templateFS, "templates/*.html") | |
| 94 | 100 | if err != nil { | |
| 95 | 101 | return nil, err | |