import wsgiref.util
webdir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "web"))
-GITWEB_BASE = "http://gitweb.samba.org"
+GITWEB_BASE = "https://gitweb.samba.org"
HISTORY_HORIZON = 1000
# this is automatically filled in
yield "<h2>Build log:</h2>\n"
yield print_log_pretty(log)
- yield "<p><small>Some of the above icons derived from the <a href='http://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>"
+ yield "<p><small>Some of the above icons derived from the <a href='https://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>"
yield "</div>"
else:
yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s;"\
class RecentCheckinsPage(HistoryPage):
- limit = 40
+ limit = 10
- def render(self, myself, tree, author=None):
+ def render(self, myself, tree, gitstart, author = None):
t = self.buildfarm.trees[tree]
interesting = list()
authors = {"ALL": "ALL"}
branch = t.get_branch()
re_author = re.compile("^(.*) <(.*)>$")
+
for entry in branch.log(limit=HISTORY_HORIZON):
m = re_author.match(entry.author)
authors[m.group(2)] = m.group(1)
yield "<input type='hidden' name='function', value='Recent Checkins'/>"
yield "</form>"
- for entry in interesting[:self.limit]:
+ gitstop = gitstart + 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 "<form method='GET'>"
+ yield "<div class='newform'>\n"
+ if gitstart != 0:
+ yield "<button name='gitstart' type='submit' value=" + str(gitstop - ( 2 * self.limit )) + " style='position:absolute;left:0px;'>Previous</button>"
+ if len(interesting) > gitstop:
+ yield "<button name='gitstart' type='submit' value=" + str(gitstop) + " style='position:absolute;right:0px;'>Next</button>"
+ yield "<input type='hidden' name='function', value='Recent Checkins'/>"
+ yield "<input type='hidden' name='gitcount' value='%s'/>" % gitstop
+ if author and author != "ALL":
+ yield "<input type='hidden' name='author' value='%s'/>" % author
+ yield "<input type='hidden' name='tree' value='%s'/>" % tree
+ yield "</div>\n"
+ yield "</form>"
+ yield "<br>"
class BuildFarmApp(object):
yield " <meta name='description' contents='Home of the Samba Build Farm, the automated testing facility.'/>\n"
yield " <meta name='robots' contents='noindex'/>"
yield " <link rel='stylesheet' href='/build_farm.css' type='text/css' media='all'/>"
- yield " <link rel='stylesheet' href='http://www.samba.org/samba/style/common.css' type='text/css' media='all'/>"
- yield " <link rel='shortcut icon' href='http://www.samba.org/samba/images/favicon.ico'/>"
+ yield " <link rel='stylesheet' href='//www.samba.org/samba/style/common.css' type='text/css' media='all'/>"
+ yield " <link rel='shortcut icon' href='//www.samba.org/samba/images/favicon.ico'/>"
yield " </head>"
yield "<body>"
elif fn_name == "Recent_Checkins":
# validate the tree
author = get_param(form, 'author')
+ gitstart = get_param(form, 'gitstart')
+ if gitstart == None:
+ gitstart = 0
+ else:
+ gitstart = int(gitstart)
page = RecentCheckinsPage(self.buildfarm)
- yield "".join(self.html_page(form, page.render(myself, tree, author)))
+ yield "".join(self.html_page(form, page.render(myself, tree, gitstart, author)))
elif fn_name == "diff":
revision = get_param(form, 'revision')
page = DiffPage(self.buildfarm)