diff --git a/tools/daca2-report.py b/tools/daca2-report.py
index 1f4dca7f9..c471f34ba 100644
--- a/tools/daca2-report.py
+++ b/tools/daca2-report.py
@@ -30,6 +30,18 @@ def readdate(data):
return None
datepos += 1
+def summaryHtml(style, font, text1, text2, text3):
+ font1 = ''
+ font2 = ''
+ if font:
+ font1 = font
+ font2 = ''
+ return '
' +
+ '' + font1 + text1 + font2 + ' | ' +
+ '' + font1 + text2 + font2 + ' | ' +
+ '' + font1 + text3 + font2 + ' | ' +
+ '
\n'
+
daca2folder = os.path.expanduser('~/daca2/')
path = ''
for arg in sys.argv[1:]:
@@ -75,8 +87,8 @@ recent = []
totalNumber = {}
categories = {}
for severity in ['error', 'warning', 'style', 'portability', 'performance']:
- totalNumber[severity] = 0
- categories[severity] = []
+ totalNumber[severity] = 0
+ categories[severity] = []
daca2 = daca2folder
for lib in (False, True):
@@ -158,12 +170,12 @@ mainpage.write('\n')
mainpage.write('Summary\n')
mainpage.write('\n')
-mainpage.write('Severity | Types | Amount | \n')
-mainpage.write('
Error (there is bug) | ' + str(len(categories['error'])) + ' | ' + str(totalNumber['error']) + ' |
\n')
-mainpage.write('Warning (potential bug) | ' + str(len(categories['warning'])) + ' | ' + str(totalNumber['warning']) + ' |
\n')
-mainpage.write('Style | ' + str(len(categories['style'])) + ' | ' + str(totalNumber['style']) + ' |
\n')
-mainpage.write('Portability | ' + str(len(categories['portability'])) + ' | ' + str(totalNumber['portability']) + ' |
\n')
-mainpage.write('Performance | ' + str(len(categories['performance'])) + ' | ' + str(totalNumber['performance']) + ' |
\n')
+mainpage.write(summaryHtml('style="background-color:#369"', '', 'Severity', 'Types', 'Amount'))
+mainpage.write(summaryHtml('style="background-color:#fff"', None, 'Error (there is bug)', categories['error'], totalNumber['error']))
+mainpage.write(summaryHtml('style="background-color:#ccccff"', None, 'Warning (potential bug)', categories['warning'], totalNumber['warning']))
+mainpage.write(summaryHtml('style="background-color:#fff"', None, 'Style', categories['style'], totalNumber['style']))
+mainpage.write(summaryHtml('style="background-color:#ccccff"', None, 'Portability', categories['portability'], totalNumber['portability']))
+mainpage.write(summaryHtml('style="background-color:#fff"', None, 'Performance', categories['performance'], totalNumber['performance']))
mainpage.write('
\n')
if lastupdate: