Permalink
Browse files

Further work on a transposed grid

I think it's done
  • Loading branch information...
Joshua Kugler
Joshua Kugler committed Apr 29, 2009
1 parent 8763836 commit 19fcf45c60d3058b2ed3688d78f33979ba9fe001
Showing with 28 additions and 11 deletions.
  1. +1 −0 buildbot/status/web/baseweb.py
  2. +27 −11 buildbot/status/web/grid.py
@@ -470,6 +470,7 @@ def setupUsualPages(self, numbuilds):
#self.putChild("", IndexOrWaterfallRedirection())
self.putChild("waterfall", WaterfallStatusResource())
self.putChild("grid", GridStatusResource())
+ self.putChild("tgrid", TransposedGridStatusResource())
self.putChild("builders", BuildersResource()) # has builds/steps/logs
self.putChild("changes", ChangesResource())
self.putChild("buildslaves", BuildSlavesResource())
@@ -66,7 +66,7 @@ def head(self, request):
# if p:
# self.title = "BuildBot: %s" % p
#
- def build_td(self, request, build):
+ def build_td(self, request, build, extra=''):
if not build:
return '<td class="build">&nbsp;</td>\n'
@@ -85,7 +85,9 @@ def build_td(self, request, build):
text = '<br />\n'.join(text)
class_ = build_get_class(build)
- return '<td class="build %s">%s</td>\n' % (class_, text)
+ if extra:
+ extra = '<br/>' + extra
+ return '<td class="build %s">%s%s</td>\n' % (class_, text, extra)
def builder_td(self, request, builder):
state, builds = builder.getState()
@@ -173,7 +175,9 @@ def __init__(self, allowForce=True, css=None):
def body(self, request):
- "This method builds the main waterfall display."
+ """This method builds the regular grid display.
+ That is, build stamps across the top, build hosts down the left side
+ """
# get url parameters
numBuilds = int(request.args.get("width", [5])[0])
@@ -266,10 +270,12 @@ def __init__(self, allowForce=True, css=None):
def body(self, request):
- "This method builds the main waterfall display."
+ """This method builds the transposed grid display.
+ That is, build hosts across the top, ebuild stamps down the left side
+ """
# get url parameters
- numBuilds = int(request.args.get("width", [5])[0])
+ numBuilds = int(request.args.get("length", [5])[0])
categories = request.args.get("category", [])
branch = request.args.get("branch", [ANYBRANCH])[0]
if branch == 'trunk': branch = None
@@ -292,12 +298,12 @@ def body(self, request):
if branch != ANYBRANCH:
data += '\n<br /><b>Branch:</b> %s' % (branch or 'trunk')
data += '</td>\n'
- for stamp in stamps:
- data += self.stamp_td(stamp)
- data += '</tr>\n'
sortedBuilderNames = status.getBuilderNames()[:]
sortedBuilderNames.sort()
+
+ builder_builds = {}
+
for bn in sortedBuilderNames:
builds = [None] * len(stamps)
@@ -313,10 +319,20 @@ def body(self, request):
builds[i] = build
build = build.getPreviousBuild()
- data += '<tr>\n'
data += self.builder_td(request, builder)
- for build in builds:
- data += self.build_td(request, build)
+ builder_builds[bn] = builds
+
+ data += '</tr>\n'
+
+ for i in range(len(stamps)):
+ data += '<tr>\n'
+ data += self.stamp_td(stamps[i])
+ for bn in sortedBuilderNames:
+ if stamps[i].branch:
+ extra = 'on ' + str(stamps[i].branch)
+ else:
+ extra = ''
+ data += self.build_td(request, builder_builds[bn][i], extra)
data += '</tr>\n'
data += '</table>\n'

0 comments on commit 19fcf45

Please sign in to comment.