Beispiel #1
0
    def __init__(self, http_port=None, distrib_port=None, allowForce=None,
                 public_html="public_html", site=None, numbuilds=20,
                 num_events=200, num_events_max=None, auth=None,
                 order_console_by_time=False, changecommentlink=None,
                 revlink=None, projects=None, repositories=None,
                 authz=None, logRotateLength=None, maxRotatedFiles=None,
                 change_hook_dialects = None, provide_feeds=None):

        if change_hook_dialects is None:
            change_hook_dialects = {}

        # Call the original initializer without the
        # change_hook_dialects information.
        OrigWebStatus.__init__(self, http_port, distrib_port, allowForce,
                                public_html, site, numbuilds,
                                num_events, num_events_max, auth,
                                order_console_by_time, changecommentlink,
                                revlink, projects, repositories,
                                authz, logRotateLength, maxRotatedFiles,
                                {}, provide_feeds)

        if change_hook_dialects:
            self.change_hook_dialects = change_hook_dialects
            # Override the usual ChangeHookResource
            # so that callables can be used directly.
            self.putChild("change_hook", CallableChangeHookResource(
                dialects = self.change_hook_dialects))
Beispiel #2
0
 def setupUsualPages(self, *args, **kwargs):
     WebStatus.setupUsualPages(self, *args, **kwargs)
     # self.putChild("buggraph", BugGraph())
     self.putChild("", LatestBuilds("root.html"))
     self.putChild("latestbuilds", LatestBuilds())
     self.putChild("latestbuildsb", LatestBuilds("latestbuilds_bare.html"))
     self.putChild("builders", OOBuildersResource())
Beispiel #3
0
 def setupUsualPages(self, *args, **kwargs):
     WebStatus.setupUsualPages(self, *args, **kwargs)
     # self.putChild("buggraph", BugGraph())
     self.putChild("", LatestBuilds("root.html"))
     self.putChild("latestbuilds", LatestBuilds())
     self.putChild("latestbuildsb", LatestBuilds("latestbuilds_bare.html"))
     self.putChild("builders", OOBuildersResource())
Beispiel #4
0
 def setupSite(self):
     provide_feeds = list(self.provide_feeds)
     try:
         provide_feeds.remove('json')
     except ValueError:
         pass
     OrigWebStatus.setupSite(self)
     if 'json' in self.provide_feeds:
         status = self.getStatus()
         self.site.resource.putChild("json", JsonStatusResource(status))
Beispiel #5
0
    def setupUsualPages(self, numbuilds, num_events, num_events_max):
        # run parent logic to setup the usual pages
        WebStatus.setupUsualPages(self, numbuilds, num_events, num_events_max)

        # setup our context pages
        self.putChild('buildtracker', BuildtrackerRoot(
            buildtrackerDbCon=BuildtrackerWebStatus.buildtrackerDbCon,
            buildbotDbCon=BuildtrackerWebStatus.buildbotDbCon,
            buildmaster_path=BuildtrackerWebStatus.buildmaster_path
        ))
def CreateWebStatus(port,
                    templates=None,
                    tagComparator=None,
                    customEndpoints=None,
                    console_repo_filter=None,
                    console_builder_filter=None,
                    web_template_globals=None,
                    **kwargs):
    webstatus = WebStatus(port, **kwargs)
    webstatus.templates.filters.update({"escapejs": EscapeJs})
    if templates:
        # Manipulate the search path for jinja templates
        # pylint: disable=F0401
        import jinja2
        # pylint: disable=E1101
        old_loaders = webstatus.templates.loader.loaders
        # pylint: disable=E1101
        new_loaders = old_loaders[:1]
        new_loaders.extend([jinja2.FileSystemLoader(x) for x in templates])
        new_loaders.extend(old_loaders[1:])
        webstatus.templates.loader.loaders = new_loaders
    chromium_status.SetupChromiumPages(
        webstatus,
        tagComparator,
        customEndpoints,
        console_repo_filter=console_repo_filter,
        console_builder_filter=console_builder_filter)
    if web_template_globals:
        webstatus.templates.globals.update(web_template_globals)
    return webstatus
Beispiel #7
0
    def __init__(self, moduleset, modules, slaves, *args, **kwargs):
        WebStatus.__init__(self, *args, **kwargs)
        self.moduleset = moduleset
        self.modules = modules
        self.slaves = slaves

        # set up the per-module waterfalls
        for module in self.modules:
            self.putChild(module, JhWaterfallStatusResource(categories=[module]))

        # set the summary homepage
        self.putChild("", ProjectsSummary())

        # set custom changes pages
        self.putChild('changes', ChangesResource())
        self.putChild('builders', JhBuildersResource())
        self.putChild('bots', JhBuildbotsResource())

        # and more pages
        self.putChild('modules.txt', ListOfModules())
Beispiel #8
0
    def __init__(self, moduleset, modules, slaves, *args, **kwargs):
        WebStatus.__init__(self, *args, **kwargs)
        self.moduleset = moduleset
        self.modules = modules
        self.slaves = slaves

        # set up the per-module waterfalls
        for module in self.modules:
            self.putChild(module,
                          JhWaterfallStatusResource(categories=[module]))

        # set the summary homepage
        self.putChild("", ProjectsSummary())

        # set custom changes pages
        self.putChild('changes', ChangesResource())
        self.putChild('builders', JhBuildersResource())
        self.putChild('bots', JhBuildbotsResource())

        # and more pages
        self.putChild('modules.txt', ListOfModules())
Beispiel #9
0
def CreateWebStatus(port, templates=None, tagComparator=None, **kwargs):
    webstatus = WebStatus(port, **kwargs)
    if templates:
        # Manipulate the search path for jinja templates
        # pylint: disable=F0401
        import jinja2
        # pylint: disable=E1101
        old_loaders = webstatus.templates.loader.loaders
        # pylint: disable=E1101
        new_loaders = old_loaders[:1]
        new_loaders.extend([jinja2.FileSystemLoader(x) for x in templates])
        new_loaders.extend(old_loaders[1:])
        webstatus.templates.loader.loaders = new_loaders
    chromium_status.SetupChromiumPages(webstatus, tagComparator)
    return webstatus
Beispiel #10
0
 def setupSite(self):
     OrigWebStatus.setupSite(self)
Beispiel #11
0
 def setupUsualPages(self, *args, **kwargs):
     OrigWebStatus.setupUsualPages(self, *args, **kwargs)
     self.putChild("components", ComponentsResource())
Beispiel #12
0
 def __init__(self, http_port=None, distrib_port=None, allowForce=False):
     WebStatus.__init__(self, http_port=http_port, distrib_port=distrib_port, allowForce=allowForce)
Beispiel #13
0
    def setupSite(self):
        WebStatus.setupSite(self)

        # load the template into memory
        self.template = open(os.path.join(self.parent.basedir,
                                          "template.html")).read()
Beispiel #14
0
    def setupSite(self):
        WebStatus.setupSite(self)

        # load the template into memory
        self.template = open(os.path.join(self.parent.basedir, "template.html")).read()
Beispiel #15
0
 def setupUsualPages(self):
     WebStatus.setupUsualPages(self)
     self.putChild("buggraph", BugGraph())
     self.putChild("latestbuilds", LatestBuilds())
Beispiel #16
0
 def __init__(self, http_port=None, distrib_port=None, allowForce=False):
     WebStatus.__init__(self, http_port=http_port, distrib_port=distrib_port, allowForce=allowForce)