def __init__(self, allowForce=True, css=None): HtmlResource.__init__(self) self.status = None self.control = None self.changemaster = None self.allowForce = allowForce self.css = css
def __init__(self, orderByTime=False): HtmlResource.__init__(self) self.status = None if orderByTime: self.comparator = TimeRevisionComparator() else: self.comparator = IntegerRevisionComparator()
def __init__(self, categories=None, num_events=200, num_events_max=None, title='Waterfall', only_show_failures=False, builder_filter=lambda x: not builder_name_schema.IsTrybot(x)): HtmlResource.__init__(self) self.categories = categories self.num_events = num_events self.num_events_max = num_events_max self.putChild("help", WaterfallHelp(categories)) self.BuilderFilter = builder_filter self.title = title self.only_show_failures = only_show_failures
def __init__(self, orderByTime=False, repository=None, builder_filter_fn=lambda builderName: True): HtmlResource.__init__(self) self.repository = repository self.builder_filter_fn = builder_filter_fn self.status = None self.cache = CacheStatus() if orderByTime: self.comparator = TimeRevisionComparator() else: self.comparator = IntegerRevisionComparator()
def __init__(self, allowForce=True, css=None, orderByTime=False): HtmlResource.__init__(self) self.status = None self.control = None self.changemaster = None self.initialRevs = None self.allowForce = allowForce self.css = css if orderByTime: self.comparator = TimeRevisionComparator() else: self.comparator = IntegerRevisionComparator()
def getChild(self, path, req): if path == '': return Redirect('..') parent = req.site.buildbot_service if path in parent.slaves: return JhBuildbotResource(path, req) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == '': return Redirect('..') for s in self.build_status.getSteps(): if s.getName() == path: return JhStatusResourceBuildStep(self.build_status, s) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "build": if not self.getAuthz(req).actionAllowed('forceBuild', req): return Redirect(path_to_authfail(req)) return self.build(req) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "forceall": return self.forceall(req) if path == "stopall": return self.stopall(req) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "force": return self.force(req) if path == "ping": return self.ping(req) if path == "events": num = req.postpath.pop(0) req.prepath.append(num) num = int(num) # TODO: is this dead code? .statusbag doesn't exist,right? log.msg("getChild['path']: %s" % req.uri) return NoResource("events are unavailable until code gets fixed") filename = req.postpath.pop(0) req.prepath.append(filename) e = self.builder_status.getEventNumbered(num) if not e: return NoResource("No such event '%d'" % num) file = e.files.get(filename, None) if file == None: return NoResource("No such file '%s'" % filename) if type(file) == type(""): if file[:6] in ("<HTML>", "<html>"): return static.Data(file, "text/html") return static.Data(file, "text/plain") return file if path == "builds": return BuildsResource(self.builder_status, self.builder_control) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): for log in self.step_status.getLogs(): if path == log.getName(): if log.hasContents(): return IHTMLLog(interfaces.IStatusLog(log)) return NoResource("Empty Log '%s'" % path) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "forceselected": return self.forceselected(req) if path == "stopselected": return self.stopselected(req) return HtmlResource.getChild(self, path, req)
def getChild(self, path, request): if path == "delete": return DeleteProject(self.project) builder = self.getStatus(request).getBuilder(self.project) build = builder.getBuild(int(path)) if build: return Build(build) return HtmlResource.getChild(self, path, request)
def getChild(self, path, req): s = self.getStatus(req) if path in s.getBuilderNames(): builder_status = s.getBuilder(path) return StatusResourceBuilder(builder_status) if path == "_all": return StatusResourceAllBuilders(self.getStatus(req)) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "forceall": return self.forceall(req) if path == "stopall": return self.stopall(req) if path == "stopchangeall": return StopChangeAllResource(self.status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "forceselected": return self.forceselected(req) if path == "stopselected": return self.stopselected(req) if path == "cancelpendingselected": return CancelAllPendingBuildsActionResource(self.status, 'selected') return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "stop": return self.stop(req) if path == "rebuild": return self.rebuild(req) if path == "steps": return StepsResource(self.build_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): tpath = None if path: tpath = tuple(path.split(self.nameDelim)) if tpath: tr = self.build_status.getTestResults().get(tpath) if tr: return StatusResourceBuildTest(self.build_status, tr) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "force": return self.force(req) if path == "ping": return self.ping(req) if path == "cancelbuild": return self.cancelbuild(req) if path == "builds": return BuildsResource(self.builder_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "forceall": return self.forceall(req) if path == "stopall": return self.stopall(req) if path == "stopchangeall": return StopChangeAllResource(self.status) if path == "cancelpendingall": return CancelAllPendingBuildsActionResource(self.status, 'all') return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): try: num = int(path) except ValueError: num = None if num is not None: build_status = self.builder_status.getBuild(num) if build_status: return StatusResourceBuild(build_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "force": return self.force(req) if path == "ping": return self.ping(req) if path == "cancelbuild": return self.cancelbuild(req) if path == "stopchange": return self.stopchange(req) if path == "builds": return BuildsResource(self.builder_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "force": return ForceBuildActionResource(self.builder_status) if path == "ping": return self.ping(req) if path == "cancelbuild": return CancelChangeResource(self.builder_status) if path == "stopchange": return StopChangeResource(self.builder_status) if path == "builds": return BuildsResource(self.builder_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): s = self.getStatus(req) if path in s.getBuilderNames(): builder_status = s.getBuilder(path) builder_control = None c = self.getControl(req) if c: builder_control = c.getBuilder(path) return StatusResourceBuilder(builder_status, builder_control) if path == "_all": return StatusResourceAllBuilders(self.getStatus(req), self.getControl(req)) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): if path == "stop": return self.stop(req) if path == "cancel": return self.cancelBuild(req) if path == "stopchain": return self.stopchain(req) if path == "steps": return StepsResource(self.build_status) if path == "tests": return TestsResource(self.build_status) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): try: num = int(path) except ValueError: num = None if num is not None: build_status = self.builder_status.getBuild(num) if build_status: if self.builder_control: build_control = self.builder_control.getBuild(num) else: build_control = None return StatusResourceBuild(build_status, build_control, self.builder_control) return HtmlResource.getChild(self, path, req)
def getChild(self, path, req): for log in self.step_status.getLogs(): if path == log.getName(): if log.hasContents(): content = log.getText() is_html_log = isinstance(log, HTMLLogFile) if is_html_log and log.content_type == 'json': return JSONTestResource(log, self.step_status) elif is_html_log and (log.content_type == 'xml' or ('xml-stylesheet' in content or 'nosetests' in content)): return XMLTestResource(log, self.step_status) else: return IHTMLLog(interfaces.IStatusLog(log)) return NoResource("Empty Log '%s'" % path) return HtmlResource.getChild(self, path, req)
def __init__(self, template=False): HtmlResource.__init__(self) if not template: self.tpl_page = "latestbuilds.html" else: self.tpl_page = template
def __init__(self, builder_status, numbuilds=20): HtmlResource.__init__(self) self.builder_status = builder_status self.numbuilds = numbuilds
def __init__(self, builder, numbuilds=20): HtmlResource.__init__(self) self.builder = builder self.builder_name = builder.getName() self.numbuilds = numbuilds self.title = "Recent Builds of %s" % self.builder_name
def __init__(self, build_status): HtmlResource.__init__(self) self.build_status = build_status
def __init__(self, slavename): HtmlResource.__init__(self) self.slavename = slavename
def __init__(self, categories=None): HtmlResource.__init__(self) self.categories = categories
def __init__(self, builder_status, builder_control): HtmlResource.__init__(self) self.builder_status = builder_status self.builder_control = builder_control
def __init__(self, status, control): HtmlResource.__init__(self) self.status = status self.control = control
def __init__(self, text, pageTitle, parent_node): HtmlResource.__init__(self) self.text = text self.pageTitle = pageTitle self.parent_level = parent_node.level self.parent_children = parent_node.children.keys()
def getChild(self, path, req): # if path == "logs": # return LogsResource(self.step_status) #TODO we need another class return HtmlResource.getChild(self, path, req)
def __init__(self, tags=None, num_events=200, num_events_max=None): HtmlResource.__init__(self) self.tags = tags self.num_events = num_events self.num_events_max = num_events_max self.putChild("help", WaterfallHelp(tags))
def __init__(self, categories=None, num_events=200, num_events_max=None): HtmlResource.__init__(self) self.categories = categories self.num_events=num_events self.num_events_max=num_events_max self.putChild("help", WaterfallHelp(categories))
def __init__(self, categories=None): HtmlResource.__init__(self) self.categories = categories self.putChild("help", WaterfallHelp(categories))
def __init__(self, uid): HtmlResource.__init__(self) self.uid = int(uid)
def getChild(self, path, req): for s in self.build_status.getSteps(): if s.getName() == path: return StatusResourceBuildStep(self.build_status, s) return HtmlResource.getChild(self, path, req)
def __init__(self): HtmlResource.__init__(self)
def __init__(self, categories=None): HtmlResource.__init__(self)
def __init__(self, step_status): HtmlResource.__init__(self) self.step_status = step_status
def getChild(self, path, req): if path == "text": self.asText = True return self return HtmlResource.getChild(self, path, req)
def __init__(self, text, pageTitle, parent_node): HtmlResource.__init__(self) self.text = text self.pageTitle = pageTitle self.parent_node = parent_node
def __init__(self, numbuilds=20): HtmlResource.__init__(self) self.numbuilds = numbuilds
def __init__(self, build_status, test_result): HtmlResource.__init__(self) self.status = build_status self.test_result = test_result
def __init__(self, build_status, step_status): HtmlResource.__init__(self) self.status = build_status self.step_status = step_status
def __init__(self, project, numbuilds=15): HtmlResource.__init__(self) self.project = project self.numbuilds = numbuilds
def __init__(self, status): HtmlResource.__init__(self) self.status = status
def getChild(self, path, req): if path == "logs": return LogsResource(self.step_status) return HtmlResource.getChild(self, path, req)