Commit 4453319f authored by Dylan Baker's avatar Dylan Baker

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's avatarDylan Baker <baker.dylan.c@gmail.com>
Reviewed-By: Aaron Watry's avatarAaron Watry <awatry@gmail.com>
Reviewed-By: Kenneth Graunke (semi-AFK still)'s avatarKenneth Graunke <kenneth@whitecape.org>
parent 90def853
......@@ -707,7 +707,7 @@ class NewSummary:
copy("templates/result.css", path.join(destination, "result.css"))
# Create the mako object for creating the test/index.html file
testindex = Template(filename="templates/test_index.mako",
testindex = Template(filename="templates/testrun_info.mako",
output_encoding="utf-8",
module_directory=".makotmp")
......
<?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>
<?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>
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment