diff options
-rw-r--r-- | tko/compose_query.cgi | 1 | ||||
-rwxr-xr-x | tko/display.py | 27 | ||||
-rwxr-xr-x | tko/group_test.cgi | 1 | ||||
-rwxr-xr-x | tko/machine_kernel_test.cgi | 2 | ||||
-rwxr-xr-x | tko/machine_kernel_test_jobs.cgi | 1 | ||||
-rw-r--r-- | tko/test.cgi | 3 |
6 files changed, 26 insertions, 9 deletions
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi index 460513b3..1073c123 100644 --- a/tko/compose_query.cgi +++ b/tko/compose_query.cgi @@ -20,6 +20,7 @@ cgitb.enable() db = db.db() def main(): + display.print_main_header() # parse the fields from the form. form = cgi.FieldStorage() diff --git a/tko/display.py b/tko/display.py index 40dda0b8..9d85a9d2 100755 --- a/tko/display.py +++ b/tko/display.py @@ -1,12 +1,16 @@ import os, re, parse, sys, frontend color_map = { - 'GOOD' : '#66ff66', # green + 'GOOD' : '#88ff88', # green 'WARN' : '#fffc00', # yellow - 'FAIL' : '#ff6666', # red - 'ABORT' : '#ff6666', # red - 'ERROR' : '#ff6666', # red + 'FAIL' : '#ff8888', # red + 'ABORT' : '#ff8888', # red + 'ERROR' : '#ff8888', # red 'NOSTATUS' : '#ffffff', # white + 'header' : '#e5e5c0', # greyish yellow + 'blank' : '#ffffff', # white + 'plain_text' : '#e5e5c0', # greyish yellow + 'borders' : '#bbbbbb', # grey 'white' : '#ffffff', # white 'green' : '#66ff66', # green 'yellow' : '#fffc00', # yellow @@ -22,8 +26,12 @@ class box: self.data = data if color_map.has_key(color_key): self.color = color_map[color_key] + elif header: + self.color = color_map['header'] + elif data: + self.color = color_map['plain_text'] else: - self.color = color_map['white'] + self.color = color_map['blank'] self.header = header @@ -77,7 +85,7 @@ def status_count_box(db, tests, link = None): if link: html = '<a href="%s">%s</a>' % (link, html) return box(html, db.status_word[worst]) - + def print_table(matrix): """ @@ -87,11 +95,11 @@ def print_table(matrix): Display the given matrix of data as a table. """ - print '<table cellpadding=5 border=1 class="boldtable">' + print '<table bgcolor="%s" cellspacing="1" cellpadding="5">' % ( + color_map['borders']) for row in matrix: print '<tr>' for element in row: - print element print element.html() print '</tr>' print '</table>' @@ -110,6 +118,9 @@ def sort_tests(tests): def print_main_header(): + print '<head><style type="text/css">' + print 'a { text-decoration: none }' + print '</style></head>' print '<h2>' print '<a href="machine_kernel.cgi">Functional</a>' print '   ' diff --git a/tko/group_test.cgi b/tko/group_test.cgi index 17287262..3df8e797 100755 --- a/tko/group_test.cgi +++ b/tko/group_test.cgi @@ -11,6 +11,7 @@ import db, display, frontend db = db.db() def main(): + display.print_main_header() form = cgi.FieldStorage() kernel_idx = form["kernel"].value diff --git a/tko/machine_kernel_test.cgi b/tko/machine_kernel_test.cgi index 39535941..c3d1866c 100755 --- a/tko/machine_kernel_test.cgi +++ b/tko/machine_kernel_test.cgi @@ -11,6 +11,8 @@ import db, display, frontend db = db.db() def main(): + display.print_main_header() + form = cgi.FieldStorage() kernel_idx = form['kernel'].value diff --git a/tko/machine_kernel_test_jobs.cgi b/tko/machine_kernel_test_jobs.cgi index a41030ac..6150f5c9 100755 --- a/tko/machine_kernel_test_jobs.cgi +++ b/tko/machine_kernel_test_jobs.cgi @@ -11,6 +11,7 @@ import db, display, frontend db = db.db() def main(): + display.print_main_header() form = cgi.FieldStorage() kernel_idx = form['kernel'].value diff --git a/tko/test.cgi b/tko/test.cgi index dd858b00..d96d82f5 100644 --- a/tko/test.cgi +++ b/tko/test.cgi @@ -16,6 +16,8 @@ import db, display, frontend db = db.db() def main(): + display.print_main_header() + form = cgi.FieldStorage() if form.has_key('sql'): @@ -64,4 +66,3 @@ def main(): display.print_table(matrix) main() - |