vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Show every run in the runs list
a72e39d5b08fa4285bc78ccd6a6b1b3ca992d823 · Keenan Nemetz · 10d ago · parent 1b1fa7a5
Show every run in the runs list The list still asked each row for Log and LogOID, fields the run no longer has now that logs live in run_logs. html/template stops at the first execution error and keeps the bytes it already wrote, so the page looked complete through the first run and silently dropped the rest. Recent and Get now carry HasLog from the same query, the list links a log only when one exists, and a failed render is a 500 rather than a short page.
server/web/web.go +14−3
| @@ -13,6 +13,7 @@ | |||
| 13 | 13 | package web | |
| 14 | 14 | ||
| 15 | 15 | import ( | |
| 16 | "bytes" | ||
| 16 | 17 | "html/template" | |
| 17 | 18 | "net/http" | |
| 18 | 19 | "strings" | |
| @@ -162,13 +163,23 @@ func (w *Web) serverError(rw http.ResponseWriter, r *http.Request, detail string | |||
| 162 | 163 | } | |
| 163 | 164 | ||
| 164 | 165 | func (w *Web) render(rw http.ResponseWriter, name string, data any, status int) { | |
| 166 | // Render into a buffer first. html/template stops at the first execution error | ||
| 167 | // and keeps everything it already wrote, which used to leave a page that looked | ||
| 168 | // complete up to the row that failed and silently dropped the rest. A failed | ||
| 169 | // page is a 500, not a short one. | ||
| 170 | var out bytes.Buffer | ||
| 171 | if err := w.Tmpl.ExecuteTemplate(&out, name, data); err != nil { | ||
| 172 | if w.Logger != nil { | ||
| 173 | w.Logger("render %s: %v", name, err) | ||
| 174 | } | ||
| 175 | http.Error(rw, "This page could not be rendered.", http.StatusInternalServerError) | ||
| 176 | return | ||
| 177 | } | ||
| 165 | 178 | rw.Header().Set("Content-Type", "text/html; charset=utf-8") | |
| 166 | 179 | if status != 0 { | |
| 167 | 180 | rw.WriteHeader(status) | |
| 168 | 181 | } | |
| 169 | if err := w.Tmpl.ExecuteTemplate(rw, name, data); err != nil && w.Logger != nil { | ||
| 170 | w.Logger("render %s: %v", name, err) | ||
| 171 | } | ||
| 182 | _, _ = out.WriteTo(rw) | ||
| 172 | 183 | } | |
| 173 | 184 | ||
| 174 | 185 | // open resolves a repository for the viewer, answering 404 when it is missing | |