From 60efcb9118b0f359349abc5b809e6244ad9071c7 Mon Sep 17 00:00:00 2001
From: Benoit Sigoure <tsuna@lrde.epita.fr>
Date: Wed, 7 Nov 2007 23:43:30 +0100
Subject: [PATCH 04/11] Redirect to the waterfall with the Ping/Start Build/Stop Builder buttons.
I find this much more convenient than being sent back to the index
page. When you Ping/Start/Stop a build, the first thing you want to
see is whether the ping worked or whether the build properly started
is staying green or whether builder really stopped. Or so I think.
* buildbot/status/web/build.py (StatusResourceBuild.stop),
* buildbot/status/web/builder.py (StatusResourceBuilder.force)
(StatusResourceBuilder.ping): Adjust the Redirect.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
---
buildbot/status/web/build.py | 4 ++--
buildbot/status/web/builder.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/buildbot/status/web/build.py b/buildbot/status/web/build.py
index e3ce3d9..d3f9a35 100644
|
a
|
b
|
class StatusResourceBuild(HtmlResource): |
| 187 | 187 | c.stopBuild(reason) |
| 188 | 188 | # we're at http://localhost:8080/svn-hello/builds/5/stop?[args] and |
| 189 | 189 | # we want to go to: http://localhost:8080/svn-hello/builds/5 or |
| 190 | | # http://localhost:8080/ |
| | 190 | # http://localhost:8080/waterfall |
| 191 | 191 | # |
| 192 | 192 | #return Redirect("../%d" % self.build.getNumber()) |
| 193 | | r = Redirect("../../..") # TODO: no longer correct |
| | 193 | r = Redirect("../../../../waterfall") # TODO: no longer correct |
| 194 | 194 | d = defer.Deferred() |
| 195 | 195 | reactor.callLater(1, d.callback, r) |
| 196 | 196 | return DeferredResource(d) |
diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
index 4cabf0d..870d1cf 100644
|
a
|
b
|
class StatusResourceBuilder(HtmlResource, OneLineMixin): |
| 177 | 177 | # TODO: tell the web user that their request could not be |
| 178 | 178 | # honored |
| 179 | 179 | pass |
| 180 | | return Redirect("../..") |
| | 180 | return Redirect("../../waterfall") |
| 181 | 181 | |
| 182 | 182 | def ping(self, req): |
| 183 | 183 | log.msg("web ping of builder '%s'" % self.builder_status.getName()) |
| 184 | 184 | self.builder_control.ping() # TODO: there ought to be an ISlaveControl |
| 185 | | return Redirect("../..") |
| | 185 | return Redirect("../../waterfall") |
| 186 | 186 | |
| 187 | 187 | def getChild(self, path, req): |
| 188 | 188 | if path == "force": |