Skip to content

Commit

Permalink
More robust time series.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Sep 2, 2016
1 parent 1995989 commit 2b86cb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions abilian/web/admin/panels/dashboard.py
Expand Up @@ -186,12 +186,16 @@ def uniquelogins(sessions):
try:
value = int(value)
except ValueError:
pass
continue
date_epoch = unix_time_millis(date)
weekly.append({'x': date_epoch, 'y': value})

for date, value in six.iteritems(monthly_serie):
try:
value = int(value)
except ValueError:
continue
date_epoch = unix_time_millis(date)
monthly.append({'x': date_epoch, 'y': int(value)})
monthly.append({'x': date_epoch, 'y': value})

return daily, weekly, monthly

0 comments on commit 2b86cb9

Please sign in to comment.