comparison talosnames/web.py @ 21:48b4c926be73

getting there
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 10 Jul 2012 18:56:34 -0700
parents 0a829ad6e116
children 82d15f93cc4a
comparison
equal deleted inserted replaced
20:0a829ad6e116 21:48b4c926be73
24 body=self.render()) 24 body=self.render())
25 return response(environ, start_response) 25 return response(environ, start_response)
26 26
27 def render(self): 27 def render(self):
28 template = tempita.HTMLTemplate(self.template) 28 template = tempita.HTMLTemplate(self.template)
29 data = {} 29 suites = sorted(self.api.suites.keys())
30 tests = {}
31 for suite in suites:
32 try:
33 test = self.api.test_config(suite)
34 tests[suite] = test
35 except:
36 tests[suite] = None
37
38 data = {'suites': suites,
39 'commands': self.api.buildbot_commands,
40 'tbpl': dict([(suite, self.api.tbpl_name(suite))
41 for suite in suites]),
42 'tests': tests
43 }
30 return template.substitute(data) 44 return template.substitute(data)
31 45
32 if __name__ == '__main__': 46 if __name__ == '__main__':
33 from wsgiref import simple_server 47 from wsgiref import simple_server
34 app = Handler() 48 app = Handler()