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.

Expand the admin status page into an operational dashboard

4506a4d3d279556435fdd414265e7499c3dada16 · Keenan Nemetz · 14d ago · parent 2e024cc9

server/web/web.go +5−2

@@ -24,6 +24,7 @@ import (
24 24 "github.com/rodent-software/vole/forge/config"
25 25 "github.com/rodent-software/vole/forge/identity"
26 26 "github.com/rodent-software/vole/forge/index"
27 "github.com/rodent-software/vole/forge/pageview"
27 28 "github.com/rodent-software/vole/forge/repo"
28 29 "github.com/rodent-software/vole/forge/session"
29 30 "github.com/rodent-software/vole/internal/format"
@@ -37,6 +38,7 @@ type Web struct {
37 38 Runs *runs.Store
38 39 LFS *lfs.Store
39 40 Locks *lfs.LockStore
41 PageViews *pageview.Store
40 42 Cfg *config.Config
41 43 Tmpl *template.Template
42 44 Auth *Auth
@@ -61,6 +63,9 @@ type Web struct {
61 63 devAccount *identity.Account
62 64 devSess *session.Session
63 65 devMu sync.Mutex
66
67 // statusCache holds the last filesystem walk shown on the status page.
68 statusCache statusCache
64 69 }
65 70
66 71 func New(repos *repo.Store, ix *index.Store, ident *identity.Store, rs *runs.Store, cfg *config.Config) (*Web, error) {
@@ -182,8 +187,6 @@ func pageSection(path string) string {
182 187 switch {
183 188 case path == "/" || path == "/repos/new" || strings.HasPrefix(path, "/r/"):
184 189 return "repos"
185 case strings.HasPrefix(path, "/runners"):
186 return "runners"
187 190 case strings.HasPrefix(path, "/activity"):
188 191 return "activity"
189 192 case path == "/users" || strings.HasPrefix(path, "/users/"):