Add time range to most concurrent stat

* Reorder cards
This commit is contained in:
Jonathan Wong 2015-12-12 16:21:54 -08:00
parent cb7ba7fdde
commit 53876e8f0d
2 changed files with 4 additions and 2 deletions

View file

@ -592,7 +592,9 @@ class DataFactory(object):
elif stat == 'most_concurrent':
try:
query = 'SELECT started, stopped ' \
'FROM session_history '
'FROM session_history ' \
'WHERE datetime(stopped, "unixepoch", "localtime") ' \
'>= datetime("now", "-%s days", "localtime") ' % time_range
result = monitor_db.select(query)
except:
logger.warn("Unable to execute database query for get_home_stats: most_concurrent.")