Add storage analytics page

This commit is contained in:
2026-05-18 01:09:34 +02:00
parent a91b9b36d3
commit 691041814f
9 changed files with 439 additions and 8 deletions

View File

@@ -66,6 +66,12 @@ func main() {
"add": func(a, b int) int { return a + b },
"sub": func(a, b int) int { return a - b },
"humanSize": util.HumanSize,
"percent": func(used, total int64) int {
if total == 0 {
return 0
}
return int((float64(used) / float64(total)) * 100)
},
})
r.LoadHTMLGlob("templates/*.html")