From 4156c55b4ecf5dbb848c95f30ddda779a6cdc065 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 27 Sep 2018 16:42:21 +0900 Subject: [PATCH] Added theme info to user statistics --- pages/statistics/statistics.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/statistics/statistics.go b/pages/statistics/statistics.go index a95d6992..d2a8b125 100644 --- a/pages/statistics/statistics.go +++ b/pages/statistics/statistics.go @@ -31,6 +31,7 @@ func getUserStats() []*arn.PieChart { connectionType := stats{} roundTripTime := stats{} downLink := stats{} + theme := stats{} for info := range arn.StreamAnalytics() { user, err := arn.GetUser(info.UserID) @@ -106,6 +107,9 @@ func getUserStats() []*arn.PieChart { } else { pro["Free accounts"]++ } + + settings := user.Settings() + theme[settings.Theme]++ } return []*arn.PieChart{ @@ -122,5 +126,6 @@ func getUserStats() []*arn.PieChart { arn.NewPieChart("Connection", connectionType), arn.NewPieChart("IP version", ip), arn.NewPieChart("PRO accounts", pro), + arn.NewPieChart("Theme", theme), } }