예제 #1
0
파일: web_ui.py 프로젝트: rapyuta/buildbot
 def _handle_builder(self, req):
     m = self.BUILDER_RE.match(req.path_info)
     try:
         builder = m.group(1) or None
     except Exception as e:
         builder = None
     master = BuildBotSystem(self.buildbot_url)
     if builder is None:
         data = {'names': master.getAllBuilders()}
         return 'bbw_allbuilders.html', data, 'text/html'
     else:
         class Foo:
             pass
         b = Foo()
         b.name = str(builder)
         b.current = 'CURRENT-TEXT'
         b.recent = []
         b.slaves = []
         data = {'builder': b}
         try:
             master = BuildBotSystem(self.buildbot_url)
             data = {'builder': master.getBuilder(builder)}
         except Exception as e:
             print('Error fetching builder stats', e)
         data['context'] = Context.from_request(req, ('buildbot', builder))
         return 'bbw_builder.html', data, 'text/html'
예제 #2
0
파일: web_ui.py 프로젝트: rapyuta/buildbot
 def get_timeline_events(self, req, start, stop, filters):
     try:
         master = BuildBotSystem(self.buildbot_url)
     except Exception as e:
         print('Error hitting BuildBot', e)
         return
     # This was a comprehension: the loop is clearer
     for build in master.getAllBuildsInInterval(to_timestamp(start), to_timestamp(stop)):
         # BuildBot builds are reported as
         # (builder_name, num, end, branch, rev, results, text)
         print('Reporting build', build)
         yield ('build', to_datetime(build[2]), '', build)
예제 #3
0
 def get_timeline_events(self, req, start, stop, filters):
     try:
         master = BuildBotSystem(self.buildbot_url)
     except Exception as e:
         print('Error hitting BuildBot', e)
         return
     # This was a comprehension: the loop is clearer
     for build in master.getAllBuildsInInterval(to_timestamp(start),
                                                to_timestamp(stop)):
         # BuildBot builds are reported as
         # (builder_name, num, end, branch, rev, results, text)
         print('Reporting build', build)
         yield ('build', to_datetime(build[2]), '', build)
예제 #4
0
 def get_timeline_events(self, req, start, stop, filters):
     #if not 'bbwatcher' in filters:
     #	return
     try:
         master = BuildBotSystem(self.buildbot_url)
     except Exception, e:
         print 'Error hitting BuildBot', e
         return
예제 #5
0
    def _handle_builder(self, req):
        m = self.BUILDER_RE.match(req.path_info)
        try:
            builder = m.group(1) or None
        except Exception as e:
            builder = None
        master = BuildBotSystem(self.buildbot_url)
        if builder is None:
            data = {'names': master.getAllBuilders()}
            return 'bbw_allbuilders.html', data, 'text/html'
        else:

            class Foo:
                pass

            b = Foo()
            b.name = str(builder)
            b.current = 'CURRENT-TEXT'
            b.recent = []
            b.slaves = []
            data = {'builder': b}
            try:
                master = BuildBotSystem(self.buildbot_url)
                data = {'builder': master.getBuilder(builder)}
            except Exception as e:
                print('Error fetching builder stats', e)
            data['context'] = Context.from_request(req, ('buildbot', builder))
            return 'bbw_builder.html', data, 'text/html'
예제 #6
0
파일: web_ui.py 프로젝트: 1stvamp/buildbot
		if field == 'url':
			return None
		elif field == 'title':
			return tag('Build ', tag.a('#%s'%num, href=context.href.buildbot('builder/%s/%s'%(builder_name, num))),
				' of ', builder_name, ' ', results == 'success' and tag.span('passed', style="color: #080") or tag.span('failed', style="color: #f00"))
		elif field == 'description':
			return format_to_oneliner(self.env, context, 'Built from %s'%(rev and 'r%s sources'%rev or 'local changes (see TryBuildUsage)'))

	# RequestHandler
	def _handle_builder(self, req):
		m = self.BUILDER_RE.match(req.path_info)
		try:
			builder = m.group(1) or None
		except Exception, e:
			builder = None
		master = BuildBotSystem(self.buildbot_url)
		if builder is None:
			data = { 'names': master.getAllBuilders() }
			return 'bbw_allbuilders.html', data, 'text/html'
		else:
			class Foo:
				pass
			b = Foo()
			b.name = str(builder)
			b.current = 'CURRENT-TEXT'
			b.recent = []
			b.slaves = []
			data = { 'builder': b }
			try:
				master = BuildBotSystem(self.buildbot_url)
				data = { 'builder': master.getBuilder(builder) }
예제 #7
0
                and tag.span('passed', style="color: #080")
                or tag.span('failed', style="color: #f00"))
        elif field == 'description':
            return format_to_oneliner(
                self.env, context,
                'Built from %s' % (rev and 'r%s sources' % rev
                                   or 'local changes (see TryBuildUsage)'))

    # RequestHandler
    def _handle_builder(self, req):
        m = self.BUILDER_RE.match(req.path_info)
        try:
            builder = m.group(1) or None
        except Exception, e:
            builder = None
        master = BuildBotSystem(self.buildbot_url)
        if builder is None:
            data = {'names': master.getAllBuilders()}
            return 'bbw_allbuilders.html', data, 'text/html'
        else:

            class Foo:
                pass

            b = Foo()
            b.name = str(builder)
            b.current = 'CURRENT-TEXT'
            b.recent = []
            b.slaves = []
            data = {'builder': b}
            try: