Fixed timestamps; added info to dashboard
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine
2026-07-24 12:18:22 -04:00
parent 4e0223052e
commit 2d62d1d18b
8 changed files with 100 additions and 23 deletions
+16
View File
@@ -4,9 +4,25 @@ import (
"net/http"
"github.com/flamego/template"
"git.metaunix.net/bitgoblin/blt/models"
)
func GetDashboard(t template.Template, data template.Data) {
// add tests to template; limited to 10 most recent
var tests []models.Test
models.DB.Order("updated_at desc").Limit(10).Find(&tests)
data["tests"] = tests
// add hardwares to template; limited to 5 most recent
var hardware []models.Hardware
models.DB.Order("updated_at desc").Limit(5).Find(&hardware)
data["hardware"] = hardware
// add benchmarks to template; limited to 5 most recent
var benchmarks []models.Benchmark
models.DB.Order("updated_at desc").Limit(5).Find(&benchmarks)
data["benchmarks"] = benchmarks
data["title"] = "Dashboard"
t.HTML(http.StatusOK, "index/dashboard")
}