diff bitten/trac_ext/web_ui.py @ 178:fcbe107ca755

Add some basic charts to the build status page, based on [http://www.maani.us/xml_charts/index.php XML/SWF Charts]: * Test Results displays the total number of tests and the number of test failures chronologically. * Code Coverage displays the lines of code and the number of lines covered by tests, also chronologically.
author cmlenz
date Wed, 31 Aug 2005 01:00:37 +0000
parents 79c61c26a4e1
children 88b7f3a64370
line wrap: on
line diff
--- a/bitten/trac_ext/web_ui.py
+++ b/bitten/trac_ext/web_ui.py
@@ -318,6 +318,11 @@
             {'name': platform.name, 'id': platform.id} for platform in platforms
         ]
 
+        req.hdf['config.charts'] = [
+            {'href': self.env.href.build(config.name, 'chart/unittest')},
+            {'href': self.env.href.build(config.name, 'chart/trace')}
+        ]
+
         repos = self.env.get_repository(req.authname)
         try:
             root = repos.get_node(config.path)
@@ -328,7 +333,7 @@
                     if build.status == Build.PENDING:
                         continue
                     req.hdf['%s.%s' % (prefix, build.platform)] = _build_to_hdf(self.env, req, build)
-                if idx > 4:
+                if idx > 12:
                     break
         except TracError, e:
             self.log.error('Error accessing repository info', exc_info=True)
Copyright (C) 2012-2017 Edgewall Software