def getBox(self, req): url = req.childLink("../changes/%d" % self.original.number) template = \ req.site.buildbot_service.templates.get_template("change_macros.html") who = '@'.join(self.original.getShortAuthor().split('@')[0:2]) revision = _ShortRev(self.original.revision) text = template.module.box_contents(url=url, who=who, pageTitle=self.original.comments, revision=revision) return base.Box([text], class_="Change")
def getBox(self, req): b = self.original number = b.getNumber() url = base.path_to_build(req, b) reason = b.getReason() if reason: text = (('%s<br><a href="%s">Build %d</a><br>%s') % (b.getBuilder().getName(), url, number, html.escape(reason))) else: text = ('%s<br><a href="%s">Build %d</a>' % (b.getBuilder().getName(), url, number)) color = "yellow" class_ = "start" if b.isFinished() and not b.getSteps(): # the steps have been pruned, so there won't be any indication # of whether it succeeded or failed. Color the box red or green # to show its status color = b.getColor() class_ = base.build_get_class(b) return base.Box([text], color=color, class_="BuildStep " + class_)