Fixed bugs in reporting when no data was received
Change-Id: I49de5a40fc13042b376f374b68373db2678a252e
This commit is contained in:
parent
2ae64218d6
commit
7cf8c74e7c
|
@ -52,13 +52,12 @@ def _do_this_month(data):
|
||||||
|
|
||||||
service_names = services.keys()
|
service_names = services.keys()
|
||||||
t = start_timestamp
|
t = start_timestamp
|
||||||
while True:
|
if end_timestamp:
|
||||||
if t > end_timestamp:
|
while t <= end_timestamp:
|
||||||
break
|
for service in service_names:
|
||||||
for service in service_names:
|
hourly_d = services[service]['hourly']
|
||||||
hourly_d = services[service]['hourly']
|
hourly_d.setdefault(t, 0)
|
||||||
hourly_d.setdefault(t, 0)
|
t += 3600
|
||||||
t += 3600
|
|
||||||
|
|
||||||
# now sort the dicts
|
# now sort the dicts
|
||||||
for service in service_names:
|
for service in service_names:
|
||||||
|
@ -88,7 +87,7 @@ class CostRepartitionTab(tabs.Tab):
|
||||||
|
|
||||||
class ReportingTabs(tabs.TabGroup):
|
class ReportingTabs(tabs.TabGroup):
|
||||||
slug = "reporting_tabs"
|
slug = "reporting_tabs"
|
||||||
tabs = (CostRepartitionTab)
|
tabs = (CostRepartitionTab, )
|
||||||
sticky = True
|
sticky = True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue