package master_ui import ( "html/template" "strconv" "strings" ) func join(data []int64) string { var ret []string for _, d := range data { ret = append(ret, strconv.Itoa(int(d))) } return strings.Join(ret, ",") } var funcMap = template.FuncMap{ "join": join, } var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(` SeaweedFS {{ .Version }}

Disk Stats

{{ range .DiskStatuses }} {{ end }}
{{ .Dir }} {{ .Free }} Bytes Free

System Stats

{{ range $key, $val := .Stats }} {{ end }}
Masters {{.Masters}}
Weekly # ReadRequests {{ .Counters.ReadRequests.WeekCounter.ToList | join }}
Daily # ReadRequests {{ .Counters.ReadRequests.DayCounter.ToList | join }}
Hourly # ReadRequests {{ .Counters.ReadRequests.HourCounter.ToList | join }}
Last Minute # ReadRequests {{ .Counters.ReadRequests.MinuteCounter.ToList | join }}
{{ $key }} {{ $val }}

Volumes

{{ range .Volumes }} {{ end }}
Id Collection Size Files Trash TTL
{{ .Id }} {{ .Collection }} {{ .Size }} Bytes {{ .FileCount }} {{ .DeleteCount }} / {{.DeletedByteCount}} Bytes {{ .Ttl }}
`))