mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add last result of each task to index page
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"chalk": "~0.2",
|
||||
"express": "~3.4",
|
||||
"express-hbs": "~0.2",
|
||||
"pa11y-webservice-client-node": "git+ssh://git@github.com:nature/pa11y-webservice-client-node.git#1.0.0-beta.1"
|
||||
"pa11y-webservice-client-node": "git+ssh://git@github.com:nature/pa11y-webservice-client-node.git#1.0.0-beta.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"supervisor": "~0.5"
|
||||
|
@@ -5,7 +5,7 @@ module.exports = route;
|
||||
// Route definition
|
||||
function route (app) {
|
||||
app.express.get('/', function (req, res, next) {
|
||||
app.webservice.tasks.get(function (err, tasks) {
|
||||
app.webservice.tasks.get({lastres: true}, function (err, tasks) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ module.exports = route;
|
||||
// Route definition
|
||||
function route (app) {
|
||||
app.express.get('/:id', function (req, res, next) {
|
||||
app.webservice.task(req.params.id).get(function (err, task) {
|
||||
app.webservice.task(req.params.id).get({}, function (err, task) {
|
||||
if (err) {
|
||||
return next();
|
||||
}
|
||||
|
@@ -3,7 +3,14 @@
|
||||
{{#tasks}}
|
||||
<li>
|
||||
<a href="/{{id}}">
|
||||
|
||||
{{url}} ({{standard}})
|
||||
|
||||
{{#last_result}}
|
||||
<br/>Last run: {{date}}
|
||||
<br/>Errors: {{count.error}}
|
||||
{{/last_result}}
|
||||
|
||||
</a>
|
||||
</li>
|
||||
{{/tasks}}
|
||||
|
Reference in New Issue
Block a user