fix: add totalList variable

pull/1080/head
Dipesh K.C 2022-03-08 09:45:50 +05:45 committed by GitHub
parent 9c07ec46c3
commit 47aa812787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -276,6 +276,7 @@ func (s Service) OnlineDaysPercent(days int) float32 {
func (s *Service) OnlineSince(ago time.Time) float32 {
failsList := s.FailuresSince(ago).Count()
hitsList := s.HitsSince(ago).Count()
totalList := failsList+hitsList
if failsList == 0 {
s.Online24Hours = 100.00