[Buildbot-devel] [PATCH 03/11] Add a `Stop Builder' button next to the `Force Build' one.
Benoit Sigoure
tsuna at lrde.epita.fr
Fri Nov 16 17:12:53 UTC 2007
I find it more convenient and natural to be able to start/stop
builds from the same page.
* buildbot/status/web/builder.py (StatusResourceBuilder.build_line):
Here.
Signed-off-by: Benoit Sigoure <tsuna at lrde.epita.fr>
---
buildbot/status/web/builder.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
index e56d1fd..4cabf0d 100644
--- a/buildbot/status/web/builder.py
+++ b/buildbot/status/web/builder.py
@@ -28,12 +28,21 @@ class StatusResourceBuilder(HtmlResource, OneLineMixin):
buildnum = build.getNumber()
buildurl = req.childLink("builds/%d" % buildnum)
data = '<a href="%s">#%d</a> ' % (buildurl, buildnum)
+
when = build.getETA()
if when is not None:
when_time = time.strftime("%H:%M:%S",
time.localtime(time.time() + when))
data += "ETA %ds (%s) " % (when, when_time)
data += "[%s]" % build.getCurrentStep().getName()
+
+ if self.builder_control is not None:
+ stopURL = urllib.quote(req.childLink("builds/%d/stop" % buildnum))
+ data += '''
+<form action="%s" class="command stopbuild" style="display:inline">
+ <input type="submit" value="Stop Builder" />
+</form>''' % stopURL
+
return data
def body(self, req):
--
1.5.3.5.654.gdd5ec
More information about the devel
mailing list