Ticket #138: 0004-Redirect-to-the-waterfall-with-the-Ping-Start-Build.patch

File 0004-Redirect-to-the-waterfall-with-the-Ping-Start-Build.patch, 2.5 KB (added by tsuna, 4 years ago)

[PATCH 04/11] Redirect to the waterfall with the Ping/Start? Build/Stop? Builder buttons.

  • buildbot/status/web/build.py

    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): 
    187187        c.stopBuild(reason) 
    188188        # we're at http://localhost:8080/svn-hello/builds/5/stop?[args] and 
    189189        # we want to go to: http://localhost:8080/svn-hello/builds/5 or 
    190         # http://localhost:8080/ 
     190        # http://localhost:8080/waterfall 
    191191        # 
    192192        #return Redirect("../%d" % self.build.getNumber()) 
    193         r = Redirect("../../..") # TODO: no longer correct 
     193        r = Redirect("../../../../waterfall") # TODO: no longer correct 
    194194        d = defer.Deferred() 
    195195        reactor.callLater(1, d.callback, r) 
    196196        return DeferredResource(d) 
  • buildbot/status/web/builder.py

    diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
    index 4cabf0d..870d1cf 100644
    a b class StatusResourceBuilder(HtmlResource, OneLineMixin): 
    177177            # TODO: tell the web user that their request could not be 
    178178            # honored 
    179179            pass 
    180         return Redirect("../..") 
     180        return Redirect("../../waterfall") 
    181181 
    182182    def ping(self, req): 
    183183        log.msg("web ping of builder '%s'" % self.builder_status.getName()) 
    184184        self.builder_control.ping() # TODO: there ought to be an ISlaveControl 
    185         return Redirect("../..") 
     185        return Redirect("../../waterfall") 
    186186 
    187187    def getChild(self, path, req): 
    188188        if path == "force":