summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2013-04-30 08:36:45 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2013-05-31 14:11:21 -0700
commit4453319f5109843af4b148ea49268a34b291f747 (patch)
tree9c7badf335164923921e8fd745a1ac3fffbc5328 /templates
parent90def8532e5f69c95debc7f21f55878f1678ea33 (diff)
templates: adds mako templates for new summary code
Adds the actual templates used to by the new mako based summary code. V3: - Replace tabs with spaces like python code - Rename test_index.mako to testrun_info.mako - Refactor testrun_info.mako links bar generation Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-By: Aaron Watry <awatry@gmail.com> Reviewed-By: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/index.mako75
-rw-r--r--templates/test_result.mako47
-rw-r--r--templates/testrun_info.mako49
3 files changed, 171 insertions, 0 deletions
diff --git a/templates/index.mako b/templates/index.mako
new file mode 100644
index 000000000..2f6eedf4f
--- /dev/null
+++ b/templates/index.mako
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Result summary</title>
+ <link rel="stylesheet" href="index.css" type="text/css" />
+ </head>
+ <body>
+ <h1>Result summary</h1>
+ <p>Currently showing: ${page}</p>
+ <p>Show:
+ % if page == 'all':
+ all
+ % else:
+ <a href="index.html">all</a>
+ % endif
+ % for i in ['changes', 'fixes', 'problems', 'regressions', 'skipped']:
+ % if i == page:
+ | ${i}
+ % else:
+ | <a href="${i}.html">${i}</a>
+ % endif
+ % endfor
+ </p>
+ <table>
+ <colgroup>
+ ## Name Column
+ <col />
+
+ ## Status columns
+ ## Create an additional column for each summary
+ % for _ in xrange(colnum):
+ <col />
+ % endfor
+ </colgroup>
+ % for line in results:
+ % if line['type'] == "newRow":
+ <tr>
+ % elif line['type'] == "endRow":
+ </tr>
+ % elif line['type'] == "groupRow":
+ <td>
+ <div class="${line['class']}" style="margin-left: ${line['indent']}em">
+ <b>${line['text']}</b>
+ </div>
+ </td>
+ % elif line['type'] == "testRow":
+ <td>
+ <div class="${line['class']}" style="margin-left: ${line['indent']}em">
+ ${line['text']}
+ </div>
+ </td>
+ % elif line['type'] == "groupResult":
+ <td class="${line['class']}">
+ <b>${line['text']}</b>
+ </td>
+ % elif line['type'] == "testResult":
+ <td class="${line['class']}">
+ <a href="${line['href']}">
+ ${line['text']}
+ </a>
+ </td>
+ % elif line['type'] == "subtestResult":
+ <td class="${line['class']}">
+ ${line['text']}
+ </td>
+ % elif line['type'] == "other":
+ ${line['text']}
+ % endif
+ % endfor
+ </table>
+ </body>
+</html>
diff --git a/templates/test_result.mako b/templates/test_result.mako
new file mode 100644
index 000000000..b4c692185
--- /dev/null
+++ b/templates/test_result.mako
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//END"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>${testname} - Details</title>
+ <link rel="stylesheet" href="../result.css" type="text/css" />
+ </head>
+ <body>
+ <h1>Results for ${testname}</h1>
+ <h2>Overview</h2>
+ <div>
+ <p><b>Status:</b> ${status}</p>
+ <p><b>Result:</b> ${status}</p>
+ </div>
+ <p><a href="../index.html">Back to summary</a></p>
+ <h2>Details</h2>
+ <table>
+ <tr>
+ <th>Detail</th>
+ <th>Value</th>
+ </tr>
+ <tr>
+ <td>Returncode</td>
+ <td>${returncode}</td>
+ </tr>
+ <tr>
+ <td>Time</td>
+ <td>${time}</b>
+ </tr>
+ <tr>
+ <td>Info</td>
+ <td>
+ <pre>${info}</pre>
+ </td>
+ </tr>
+ <tr>
+ <td>Command</td>
+ <td>
+ </pre>${command}</pre>
+ </td>
+ </tr>
+ </table>
+ <p><a href="../index.html">Back to summary</a></p>
+ </body>
+</html>
diff --git a/templates/testrun_info.mako b/templates/testrun_info.mako
new file mode 100644
index 000000000..e6e00b361
--- /dev/null
+++ b/templates/testrun_info.mako
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//END"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>${name} - System info</title>
+ <link rel="stylesheet" href="../result.css" type="text/css" />
+ </head>
+ <body>
+ <h1>System info for ${name}</h1>
+ <p>
+ <a href="../index.html">Back to summary</a>
+ </p>
+ <table>
+ <tr>
+ <th>Detail</th>
+ <th>Value</th>
+ </tr>
+ <tr>
+ <td>time_elapsed</td>
+ <td>${time}</td>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>${name}</td>
+ </tr>
+ <tr>
+ <td>options</td>
+ <td>${options}</td>
+ </tr>
+ <tr>
+ <td>lspci</td>
+ <td>
+ <pre>${lspci}</pre>
+ </td>
+ </tr>
+ <tr>
+ <td>glxinfo</td>
+ <td>
+ <pre>${glxinfo}</pre>
+ </td>
+ </tr>
+ </table>
+ <p>
+ <a href="../index.html">Back to summary</a>
+ </p>
+ </body>
+</html>