[Buildbot-commits] buildbot/buildbot/status html.py,1.82,1.83

Brian Warner warner at users.sourceforge.net
Mon Apr 24 07:47:04 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3497/buildbot/status

Modified Files:
	html.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-508
Creator:  Brian Warner <warner at lothar.com>

CSS cleanup: implement the acceptable parts of SF#1461675

	* buildbot/status/html.py (StatusResourceBuild.body): replace the
	bare buildbotURL/projectName line with a proper DIV, along with a
	CSS class of "title", from Stefan Seefeld (SF#1461675).
	(WaterfallStatusResource.body0): remove the redundant 'table'
	class from the table
	(WaterfallStatusResource.body): same. Also add class="LastBuild"
	to the top-row TR, and class="Activity" to the second-row TR,
	rather than putting them in the individual TD nodes.


Index: html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- html.py	16 Apr 2006 23:05:41 -0000	1.82
+++ html.py	24 Apr 2006 07:47:02 -0000	1.83
@@ -321,7 +321,8 @@
         b = self.build
         buildbotURL = self.status.getBuildbotURL()
         projectName = self.status.getProjectName()
-        data = "<a href=\"%s\">%s</a>\n" % (buildbotURL, projectName)
+        data = '<div class="title"><a href="%s">%s</a></div>\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"
@@ -1071,6 +1072,12 @@
 
     def body(self, request):
         "This method builds the main waterfall display."
+
+        data = ''
+
+        projectName = self.status.getProjectName()
+        projectURL = self.status.getProjectURL()
+
         phase = request.args.get("phase",["2"])
         phase = int(phase[0])
 
@@ -1097,27 +1104,23 @@
             return self.phase0(request, (changeNames + builderNames),
                                timestamps, eventGrid)
         # start the table: top-header material
-        data = "<table class=\"table\" border=\"0\" cellspacing=\"0\">\n"
-        #data = "<table frame=\"rhs\" rules=\"all\" class=\"table\">\n"
+        data += '<table border="0" cellspacing="0">\n'
 
-        data += " <tr>\n"
-        projectName = self.status.getProjectName()
-        projectURL = self.status.getProjectURL()
         if projectName and projectURL:
             # TODO: this is going to look really ugly
             topleft = "<a href=\"%s\">%s</a><br />last build" % \
                       (projectURL, projectName)
         else:
             topleft = "last build"
+        data += ' <tr class="LastBuild">\n'
         data += td(topleft, align="right", colspan=2, class_="Project")
         for b in builders:
             box = ITopBox(b).getBox()
             data += box.td(align="center")
         data += " </tr>\n"
 
-        data += " <tr>\n"
-        data += td("current activity", align="right", colspan=2,
-                   class_="Activity")
+        data += ' <tr class="Activity">\n'
+        data += td('current activity', align='right', colspan=2)
         for b in builders:
             box = ICurrentBox(b).getBox(self.status)
             data += box.td(align="center")
@@ -1173,9 +1176,7 @@
                 urllib.quote(request.childLink("waterfall"))
         data += " for the waterfall display</p>\n"
                 
-        #data += "<table border=\"1\">\n"
-        #data += "<table frame=\"rhs\" rules=\"all\" class=\"table\">\n"
-        data += "<table class=\"table\" border=\"0\" cellspacing=\"0\">\n"
+        data += '<table border="0" cellspacing="0">\n'
         names = map(lambda builder: builder.name, builders)
 
         # the top row is two blank spaces, then the top-level status boxes





More information about the Commits mailing list