コード例 #1
0
ファイル: web_ui.py プロジェクト: starcruiseromega/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 _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'
コード例 #3
0
ファイル: web_ui.py プロジェクト: 1stvamp/buildbot
		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) }
			except Exception, e:
				print 'Error fetching builder stats', e
			data['context'] = Context.from_request(req, ('buildbot', builder))
			return 'bbw_builder.html', data, 'text/html'

	def match_request(self, req):
		return req.path_info.startswith('/buildbot') and 1 or 0

	def process_request(self, req):
		if req.path_info.startswith('/buildbot/builder'):
			return self._handle_builder(req)
		return 'bbw_welcome.html', { 'url': self.buildbot_url }, 'text/html'
コード例 #4
0
ファイル: web_ui.py プロジェクト: thuanbk2010/katana
        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, e:
                print 'Error fetching builder stats', e
            data['context'] = Context.from_request(req, ('buildbot', builder))
            return 'bbw_builder.html', data, 'text/html'

    def match_request(self, req):
        return req.path_info.startswith('/buildbot') and 1 or 0

    def process_request(self, req):
        if req.path_info.startswith('/buildbot/builder'):
            return self._handle_builder(req)
        return 'bbw_welcome.html', {'url': self.buildbot_url}, 'text/html'