* add device limits * feat: tabs the anon and session stats w. highlight (cherry picked from commit57ca8fa368) (cherry picked from commited2722e3e6) # Conflicts: # public/app/features/admin/ServerStats.tsx # public/app/features/admin/ServerStatsCard.tsx
This commit is contained in:
+2
-2
@@ -64,8 +64,8 @@ func (hs *HTTPServer) AdminGetStats(c *contextmodel.ReqContext) response.Respons
|
||||
if err != nil {
|
||||
return response.Error(500, "Failed to get admin stats from database", err)
|
||||
}
|
||||
thirtyDays := 30 * 24 * time.Hour
|
||||
devicesCount, err := hs.anonService.CountDevices(c.Req.Context(), time.Now().Add(-thirtyDays), time.Now().Add(time.Minute))
|
||||
anonymousDeviceExpiration := 30 * 24 * time.Hour
|
||||
devicesCount, err := hs.anonService.CountDevices(c.Req.Context(), time.Now().Add(-anonymousDeviceExpiration), time.Now().Add(time.Minute))
|
||||
if err != nil {
|
||||
return response.Error(500, "Failed to get anon stats from database", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user