Updated dependencies and integrated Pirsch v1.2.0.

This commit is contained in:
Marvin Blum
2020-08-09 17:54:05 +02:00
committed by Marvin Blum
parent d71dfdf84f
commit 7c6622a0cd
4 changed files with 9 additions and 12 deletions

View File

@@ -86,7 +86,7 @@ func GetHourlyVisitorsToday() (template.JS, template.JS) {
}
func GetActiveVisitors() int {
visitors, err := analyzer.ActiveVisitors(time.Minute * 5)
visitors, err := analyzer.ActiveVisitors(pirsch.NullTenant, time.Minute*5)
if err != nil {
logbuch.Error("Error reading active visitors", logbuch.Fields{"err": err})
@@ -96,11 +96,6 @@ func GetActiveVisitors() int {
return visitors
}
func getStartTime(start int) time.Time {
startTime := today()
return startTime.Add(-time.Hour * 24 * time.Duration(start-1))
}
func getLabelsAndData(visitors []pirsch.VisitorsPerDay) (template.JS, template.JS) {
var labels strings.Builder
var dp strings.Builder