[Buildbot-devel] refresh property for the waterfall display

Mark Pauley mpauley at apple.com
Wed Jun 7 22:24:44 UTC 2006


I actually added this and ported it forward to the latest released  
buildbot source.

I'm too busy to do more at this very moment, but if someone would  
like to write a test and submit this to the integration gods:



Index: buildbot/buildbot/status/html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.84
diff -U3 -r1.84 html.py
--- buildbot/buildbot/status/html.py    21 May 2006 21:28:26  
-0000      1.84
+++ buildbot/buildbot/status/html.py    7 Jun 2006 22:18:41 -0000
@@ -144,6 +144,7 @@
class HtmlResource(Resource):
      css = None
+    refresh = None
      contentType = "text/html; charset=UTF-8"
      def render(self, request):
          data = self.content(request)
@@ -163,6 +164,9 @@
                  ' xml:lang="en">\n')
          data += "<head>\n"
          data += "  <title>" + self.title + "</title>\n"
+        if self.refresh:
+            data += '  <meta http-equiv="refresh" '
+            data += 'content="' + self.refresh + '"/>\n'
          if self.css:
              # TODO: use some sort of relative link up to the root  
page, so
              # this css can be used from child pages too
@@ -321,8 +325,7 @@
          b = self.build
          buildbotURL = self.status.getBuildbotURL()
          projectName = self.status.getProjectName()
-        data = '<div class="title"><a href="%s">%s</a></div>\n'% 
(buildbotURL,
-                                                                  
projectName)
+        data = "<a href=\"%s\">%s</a>\n" % (buildbotURL, projectName)
          # the color in the following line gives python-mode trouble
          data += ("<h1>Build <a href=\"%s\">%s</a>:#%d</h1>\n"
                   "<h2>Reason:</h2>\n%s\n"
@@ -1060,7 +1063,8 @@
      """This builds the main status page, with the waterfall  
display, and
      all child pages."""
      title = "BuildBot"
-    def __init__(self, status, changemaster, categories, css=None):
+    def __init__(self, status, changemaster, categories, css=None,
+                 refresh=None):
          HtmlResource.__init__(self)
          self.status = status
          self.changemaster = changemaster
@@ -1069,6 +1073,7 @@
          if p:
              self.title = "BuildBot: %s" % p
          self.css = css
+       self.refresh = refresh
      def body(self, request):
          "This method builds the main waterfall display."
@@ -1539,7 +1544,8 @@
      favicon = None
      robots_txt = None
-    def __init__(self, status, control, changemaster, categories, css):
+    def __init__(self, status, control, changemaster, categories, css,
+                 refresh):
          """
          @type  status:       L{buildbot.status.builder.Status}
          @type  control:      L{buildbot.master.Control}
@@ -1551,8 +1557,9 @@
          self.changemaster = changemaster
          self.categories = categories
          self.css = css
+       self.refresh = refresh
          waterfall = WaterfallStatusResource(self.status, changemaster,
-                                            categories, css)
+                                            categories, css, refresh)
          self.putChild("", waterfall)
      def render(self, request):
@@ -1630,7 +1637,7 @@
      def __init__(self, http_port=None, distrib_port=None,  
allowForce=True,
                   categories=None, css=buildbot_css,  
favicon=buildbot_icon,
-                 robots_txt=None):
+                refresh=None, robots_txt=None):
          """To have the buildbot run its own web server, pass a port  
number to
          C{http_port}. To have it run a web.distrib server
@@ -1679,6 +1686,10 @@
                          Defaults to the buildbot/buildbot.png image  
provided
                          in the distribution. Can be set to None to  
avoid
                          using a favicon at all.
+
+        @type  refresh: string
+        @param refresh: if set, emit a meta refresh tag in the head  
of page
+
          @type  robots_txt: string
          @param robots_txt: if set, provide the pathname of a  
robots.txt file.
@@ -1705,6 +1716,7 @@
          self.categories = categories
          self.css = css
          self.favicon = favicon
+       self.refresh = refresh
          self.robots_txt = robots_txt
      def __repr__(self):
@@ -1730,7 +1742,7 @@
              control = None
          change_svc = self.parent.change_svc
          sr = StatusResource(status, control, change_svc,  
self.categories,
-                            self.css)
+                            self.css, self.refresh)
          sr.favicon = self.favicon
          sr.robots_txt = self.robots_txt
          self.site = server.Site(sr)




On Jun 6, 2006, at 9:20 AM, Fred Drake wrote:

> On 6/6/06, Alexander Lorenz <lorenz at testingtech.de> wrote:
>> an also nice-to-have would be a refresh property for the waterfall
>> display (perhaps with a time value in seconds) , so you can watch the
>> build progressing without having to press the refresh button   
>> endlessly
>> to see if  a step already finished and so on ...
>
> Indeed!  Then I wouldn't need to install Opera just to get the
> "Refresh every..." feature.  ;-)
>
>
>   -Fred
>
> -- 
> Fred L. Drake, Jr.    <fdrake at gmail.com>
> "Every sin is the result of a collaboration." --Lucius Annaeus Seneca
>
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel



_Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20060607/b3387327/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: refresh property patch.txt
URL: <http://buildbot.net/pipermail/devel/attachments/20060607/b3387327/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20060607/b3387327/attachment-0001.html>


More information about the devel mailing list