Improve web interface. ()

This commit is contained in:
Antonio Navarro Perez 2021-01-02 20:09:05 +01:00 committed by GitHub
parent 7c94e663d8
commit ae289e99dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 2538 additions and 561 deletions

View file

@ -48,6 +48,12 @@ type RouteStats struct {
TorrentStats []*TorrentStats `json:"torrentStats"`
}
type ByName []*RouteStats
func (a ByName) Len() int { return len(a) }
func (a ByName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ByName) Less(i, j int) bool { return a[i].Name < a[j].Name }
type stats struct {
totalDownloadBytes int64
downloadBytes int64