Mercurial > bitten > bitten-test
changeset 388:3ba9430a5d87
Fix for hardcoded chart generators in UI. Closes #153.
author | cmlenz |
---|---|
date | Sun, 29 Jul 2007 17:30:00 +0000 |
parents | 7cd9a26134f5 |
children | c1732b415026 |
files | bitten/trac_ext/web_ui.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/trac_ext/web_ui.py +++ b/bitten/trac_ext/web_ui.py @@ -35,6 +35,7 @@ from bitten.queue import collect_changes from bitten.recipe import Recipe, InvalidRecipeError from bitten.trac_ext.api import ILogFormatter, IReportSummarizer +from bitten.trac_ext.charts import ReportChartController from bitten.util import xmlio _status_label = {Build.PENDING: 'pending', @@ -492,10 +493,13 @@ break if has_reports: - req.hdf['config.charts'] = [ - {'href': req.href.build(config.name, 'chart/test')}, - {'href': req.href.build(config.name, 'chart/coverage')} - ] + chart_generators = [] + for generator in self.chart_generators: + for category in generator.get_supported_categories(): + chart_generators.append({ + 'href': req.href.build(config.name, 'chart/' + category) + }) + req.hdf['config.charts'] = chart_generators charts_license = self.config.get('bitten', 'charts_license') if charts_license: req.hdf['config.charts_license'] = charts_license