Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Don't show charts for date ranges with no builds
Browse files Browse the repository at this point in the history
  • Loading branch information
twaugh committed Apr 12, 2016
1 parent edee8a6 commit 5f8cfb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def get_time_charts(self, time_selector, suffix, width=600, height=350):
charts = []

selector = time_selector(self.metrics['completion'])
if not any(selector):
return charts

# hourly throughput
s1 = figure(width=width, height=height, x_axis_type='datetime',
Expand Down Expand Up @@ -171,6 +173,7 @@ def until(x):

time_charts = [self.get_time_charts(until, ' (Feb 26 - Mar 16)'),
self.get_time_charts(since, ' (since Mar 16)')]
time_charts = [charts for charts in time_charts if charts]
p = [hplot(*x) for x in zip(*time_charts)]
charts = vplot(*p)
output_file('metrics.html')
Expand Down

0 comments on commit 5f8cfb5

Please sign in to comment.