|
Revision 1152, 0.8 kB
(checked in by earle, 10 months ago)
|
|
Colouring for report cells.
|
| Line | |
|---|
| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <title>Test Results</title> |
|---|
| 4 | <style type="text/css"> |
|---|
| 5 | .fail_serious { |
|---|
| 6 | background: #c00; |
|---|
| 7 | } |
|---|
| 8 | |
|---|
| 9 | .fail_minor { |
|---|
| 10 | background: #f33; |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | .pass { |
|---|
| 14 | background: #3f3; |
|---|
| 15 | } |
|---|
| 16 | </style> |
|---|
| 17 | </head> |
|---|
| 18 | <body> |
|---|
| 19 | <h1>Test Results</h1> |
|---|
| 20 | |
|---|
| 21 | <table border="1"> |
|---|
| 22 | <tr> |
|---|
| 23 | <td></td> |
|---|
| 24 | [% FOREACH test_date IN data.test_dates %] |
|---|
| 25 | <th>[% test_date %]</th> |
|---|
| 26 | [%- END %] |
|---|
| 27 | </tr> |
|---|
| 28 | [% FOREACH test_name IN data.results.keys.sort %] |
|---|
| 29 | [% test_results = data.results.$test_name %] |
|---|
| 30 | <tr> |
|---|
| 31 | <td>[% test_name.replace('_', ' ') %]</td> |
|---|
| 32 | [% FOREACH datum IN test_results.keys.sort %] |
|---|
| 33 | <td |
|---|
| 34 | [%- IF (test_results.$datum == 100) -%] |
|---|
| 35 | class="pass" |
|---|
| 36 | [%- ELSIF (test_results.$datum > 80) -%] |
|---|
| 37 | class="fail_minor" |
|---|
| 38 | [%- ELSE -%] |
|---|
| 39 | class="fail_serious"> |
|---|
| 40 | [%- END -%] |
|---|
| 41 | >[% test_results.$datum %]%</td> |
|---|
| 42 | [% END %] |
|---|
| 43 | </tr> |
|---|
| 44 | [%- END %] |
|---|
| 45 | </table> |
|---|
| 46 | |
|---|
| 47 | </body> |
|---|
| 48 | </html> |
|---|