[IMP] runbot: hide stopped hosts from dashboard page

This commit is contained in:
Christophe Simonis 2016-02-09 14:48:38 +01:00
parent f77c52119e
commit 72bfc504cc

View File

@ -1346,7 +1346,9 @@ class RunbotController(http.Controller):
b = r['branches'].setdefault(branch.id, {'name': branch.branch_name, 'builds': list()})
b['builds'].append(self.build_info(build))
for result in RB.read_group([], ['host'], ['host']):
# consider host gone if no build in last 100
build_threshold = max(builds.ids or [0]) - 100
for result in RB.read_group([('id', '>', build_threshold)], ['host'], ['host']):
if result['host']:
qctx['host_stats'].append({
'host': result['host'],