X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=buildfarm%2Fweb%2F__init__.py;h=600ce751920cc5e12c90716d3e31c07384ee787e;hb=b43a77316d4500fe30b30d581f1915476e6058ac;hp=08d577a1ba3402c676d8a2dda53aedf2efc4cf2a;hpb=242950a7095c2add03710de6ce7bed9db7a696d3;p=build-farm.git diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py index 08d577a1..600ce751 100755 --- a/buildfarm/web/__init__.py +++ b/buildfarm/web/__init__.py @@ -887,14 +887,25 @@ class DiffPage(HistoryPage): class RecentCheckinsPage(HistoryPage): - limit = 40 + limit = 10 - def render(self, myself, tree, author=None): + def render(self, myself, tree, gitcount=None, navigation=None, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = {"ALL": "ALL"} branch = t.get_branch() re_author = re.compile("^(.*) <(.*)>$") + + if navigation == "Previous": + gitstart = int(gitcount) - ( 2 * self.limit ) + gitstop = int(gitcount) - self.limit + elif navigation == "Next": + gitstart = int(gitcount) + gitstop = int(gitcount) + self.limit + else: + gitstart = 0 + gitstop = self.limit + for entry in branch.log(limit=HISTORY_HORIZON): m = re_author.match(entry.author) authors[m.group(2)] = m.group(1) @@ -910,11 +921,26 @@ class RecentCheckinsPage(HistoryPage): yield "" % tree yield "" yield "" - - for entry in interesting[:self.limit]: + + for entry in interesting[gitstart:gitstop]: changes = branch.changes_summary(entry.revision) yield "".join(self.history_row_html(myself, entry, t, changes)) yield "\n" + + yield "
" + yield "