diff options
| author | user <user@node5.net> | 2024-03-23 22:41:02 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-03-23 22:41:02 +0100 |
| commit | 1f22ef7a77a21a38d29feff621ba3a12ce60ea8f (patch) | |
| tree | 6d05e78bab8049cabf22a7e667525bd48f789e92 /src/ssh_node5_net.py | |
| parent | b17332e8f4f2ee4b73678fb9d96375d19541c7a7 (diff) | |
fix graph
Diffstat (limited to 'src/ssh_node5_net.py')
| -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), |
