From c5e645df9eba4ee8561451e04070b51ad31ab33a Mon Sep 17 00:00:00 2001
From: Christophe Monniez
Date: Wed, 10 Oct 2018 17:19:59 +0200
Subject: [PATCH] [IMP] runbot: add rebuild button on build page
When examining a particular build with the build view, one can be
frustrated being forced to navigate the frontend page to ask for a
rebuild.
With this commit, the rebuild menu entry is also visible on the build
page when the build is the last one of the branch.
Also the build host is now visible on the build page for the same
usability reason.
---
runbot/controllers/frontend.py | 3 ++-
runbot/templates/build.xml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/runbot/controllers/frontend.py b/runbot/controllers/frontend.py
index 889d5e91..915bc54b 100644
--- a/runbot/controllers/frontend.py
+++ b/runbot/controllers/frontend.py
@@ -198,7 +198,8 @@ class Runbot(http.Controller):
'build': self.build_info(build),
'br': {'branch': build.branch_id},
'logs': Logging.sudo().browse(logging_ids).ids,
- 'other_builds': other_builds.ids
+ 'other_builds': other_builds.ids,
+ 'bu_index': 0 if build == build_ids[0] else -1
}
return request.render("runbot.build", context)
diff --git a/runbot/templates/build.xml b/runbot/templates/build.xml
index c7765f60..90894fa6 100644
--- a/runbot/templates/build.xml
+++ b/runbot/templates/build.xml
@@ -105,7 +105,6 @@
-
@@ -167,6 +166,7 @@
Subject:
Author:
Committer:
+ Build host:
Duplicate of