Add results to the task page

This commit is contained in:
Rowan Manning
2013-09-16 09:10:34 +01:00
parent 8d4f79128d
commit dbc6a0a5bc
3 changed files with 21 additions and 4 deletions

View File

@@ -9,8 +9,14 @@ function route (app) {
if (err) {
return next();
}
res.render('task', {
task: task
app.webservice.task(req.params.id).results({full: true}, function (err, results) {
if (err) {
return next(err);
}
res.render('task', {
task: task,
results: results
});
});
});
});

11
view/partial/results.html Normal file
View File

@@ -0,0 +1,11 @@
<ul>
{{#results}}
<li>
<b>Date:</b> {{date}}<br/>
<b>Errors:</b> {{count.error}}<br/>
<b>Warnings:</b> {{count.warning}}<br/>
<b>Notices:</b> {{count.notice}}
</li>
{{/results}}
</ul>

View File

@@ -7,6 +7,6 @@
<h1>Task: {{task.url}} ({{task.standard}})</h1>
<p><b>TODO: Get and display results.</b></p>
<p>Here are the results:</p>
{{> tasks}}
{{> results}}