1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-25 23:21:41 +03:00

fixed usage on a day report

This commit is contained in:
Adolfo Gómez García 2020-10-27 07:55:32 +01:00
parent 6f5f17326e
commit 538779e3c1
2 changed files with 3 additions and 5 deletions

View File

@ -99,9 +99,7 @@ class CountersPoolAssigned(StatsReport):
except Exception:
continue
hours = {}
for i in range(24):
hours[i] = i * i
hours = [0] * 24
for x in counters.getCounters(pool, counters.CT_ASSIGNED, since=start, to=end, max_intervals=24, use_max=True, all=False):
hour = x[0].hour

View File

@ -31,10 +31,10 @@
</thead>
<tbody>
{% for d in data|dictsort:"name.lower" %}
{% for h, v in d.hours.items %}
{% for v in d.hours %}
<tr>
<td>{{ d.name }}</td>
<td>{{ h }}</td>
<td>{{ forloop.counter0 }}</td>
<td>{{ v }}</td>
</tr>
{% endfor %}