diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ssh_node5_net.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ssh_node5_net.py b/src/ssh_node5_net.py index 54e5721..e594f38 100644 --- a/src/ssh_node5_net.py +++ b/src/ssh_node5_net.py @@ -68,9 +68,9 @@ def index(): by_ip = {} for d in histogram: if d['ip'] not in by_ip: - by_ip[d['ip']] = [] + by_ip[d['ip']] = list(range(len(all_dates))) for date in all_dates: - by_ip[d['ip']].append(d['total_count'] if date == d['date'] else 0) + by_ip[d['ip']][all_dates.index(d['date'])] = (d['total_count'] if date == d['date'] else 0) histogram_chartjs = json.dumps([{ 'label': str(ip), |
