Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/nicolas17/buildbot
Browse files Browse the repository at this point in the history
* 'master' of git://github.com/nicolas17/buildbot:
  tgrid: Put default value of rev_order in a class variable.
  Added documentation for tgrid?rev_order.
  HTML status: Add rev_order argument to transposed grid page.
  • Loading branch information
Dustin J. Mitchell committed Sep 23, 2010
2 parents 59fec60 + 4b4dffc commit efdb7f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions master/buildbot/status/web/grid.py
Expand Up @@ -181,6 +181,7 @@ class TransposedGridStatusResource(HtmlResource, GridStatusMixin):
# TODO: docs
status = None
changemaster = None
default_rev_order = "asc"

def content(self, request, cxt):
"""This method builds the transposed grid display.
Expand All @@ -193,6 +194,10 @@ def content(self, request, cxt):
branch = request.args.get("branch", [ANYBRANCH])[0]
if branch == 'trunk': branch = None

rev_order = request.args.get("rev_order", [self.default_rev_order])[0]
if rev_order not in ["asc", "desc"]:
rev_order = self.default_rev_order

cxt['refresh'] = self.get_reload_time(request)

# and the data we want to render
Expand All @@ -212,6 +217,8 @@ def content(self, request, cxt):
cxt['builder_builds'] = builder_builds = []
cxt['builders'] = builders = []
cxt['range'] = range(len(stamps))
if rev_order == "desc":
cxt['range'].reverse()

for bn in sortedBuilderNames:
builds = [None] * len(stamps)
Expand Down
5 changes: 5 additions & 0 deletions master/docs/cfg-statustargets.texinfo
Expand Up @@ -234,6 +234,11 @@ of the page, and the build hosts are listed across the top. It accepts
the same query arguments. The exception being that instead of ``width''
the argument is named ``length.''

This page also has a ``rev_order='' query argument that
lets you change in what order revisions are shown.
Valid values are ``asc'' (ascending, oldest revision first)
and ``desc'' (descending, newest revision first).

@item /console

EXPERIMENTAL: This provides a developer-oriented display of the the last
Expand Down

0 comments on commit efdb7f5

Please sign in to comment.