diff --git a/modules/ts/misc/summary.py b/modules/ts/misc/summary.py index f5989d74c..582726a05 100644 --- a/modules/ts/misc/summary.py +++ b/modules/ts/misc/summary.py @@ -80,7 +80,7 @@ if __name__ == "__main__": tbl = table(metrix_table[options.metric][0]) # header - tbl.newColumn("name", "Name of Test", align = "left") + tbl.newColumn("name", "Name of Test", align = "left", cssclass = "col_name") i = 0 for set in test_sets: tbl.newColumn(str(i), set[0].replace(".xml","").replace("_", "\n"), align = "center") @@ -88,7 +88,7 @@ if __name__ == "__main__": if options.calc_relatives: i = 1 for set in test_sets[1:]: - tbl.newColumn(str(i) + "%", set[0].replace(".xml","").replace("_", "\n") + "\nvs\n" + test_sets[0][0].replace(".xml","").replace("_", "\n"), align = "center") + tbl.newColumn(str(i) + "%", set[0].replace(".xml","").replace("_", "\n") + "\nvs\n" + test_sets[0][0].replace(".xml","").replace("_", "\n"), align = "center", cssclass = "col_rel") i += 1 # rows diff --git a/modules/ts/misc/table_formatter.py b/modules/ts/misc/table_formatter.py index c573e7c44..1b652ff86 100644 --- a/modules/ts/misc/table_formatter.py +++ b/modules/ts/misc/table_formatter.py @@ -354,11 +354,14 @@ class table(object): for th in row.cells: align = self.getValue("align", ((None, th)[isinstance(th, tblCell)]), row, row) valign = self.getValue("valign", th, row) + cssclass = self.getValue("cssclass", th) attr = "" if align: attr += " align=\"%s\"" % align if valign: attr += " valign=\"%s\"" % valign + if cssclass: + attr += " class=\"%s\"" % cssclass css = "" if embeedcss: css = " style=\"border:none;color:#003399;font-size:16px;font-weight:normal;white-space:nowrap;padding:3px 10px;\"" @@ -444,6 +447,91 @@ html, body {font-family: Lucida Console, Courier New, Courier;font-size: 16px;co .tbl tbody tr:hover td{color:#000099;} .tbl caption{font:italic 16px "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif;padding:0 0 5px;text-align:right;white-space:normal;} + + """ % titletag) @@ -599,4 +687,4 @@ if __name__ == "__main__": tbl.consolePrintTable(sys.stdout) if options.generateHtml: - htmlPrintFooter(sys.stdout) \ No newline at end of file + htmlPrintFooter(sys.stdout)