mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot: hide stopped hosts from dashboard page
This commit is contained in:
parent
f77c52119e
commit
72bfc504cc
@ -1346,7 +1346,9 @@ class RunbotController(http.Controller):
|
|||||||
b = r['branches'].setdefault(branch.id, {'name': branch.branch_name, 'builds': list()})
|
b = r['branches'].setdefault(branch.id, {'name': branch.branch_name, 'builds': list()})
|
||||||
b['builds'].append(self.build_info(build))
|
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']:
|
if result['host']:
|
||||||
qctx['host_stats'].append({
|
qctx['host_stats'].append({
|
||||||
'host': result['host'],
|
'host': result['host'],
|
||||||
|
Loading…
Reference in New Issue
Block a user