forked from external-repos/pa11y-dashboard
Add last result of each task to index page
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"chalk": "~0.2",
|
"chalk": "~0.2",
|
||||||
"express": "~3.4",
|
"express": "~3.4",
|
||||||
"express-hbs": "~0.2",
|
"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": {
|
"devDependencies": {
|
||||||
"supervisor": "~0.5"
|
"supervisor": "~0.5"
|
||||||
|
@@ -5,7 +5,7 @@ module.exports = route;
|
|||||||
// Route definition
|
// Route definition
|
||||||
function route (app) {
|
function route (app) {
|
||||||
app.express.get('/', function (req, res, next) {
|
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) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ module.exports = route;
|
|||||||
// Route definition
|
// Route definition
|
||||||
function route (app) {
|
function route (app) {
|
||||||
app.express.get('/:id', function (req, res, next) {
|
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) {
|
if (err) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,14 @@
|
|||||||
{{#tasks}}
|
{{#tasks}}
|
||||||
<li>
|
<li>
|
||||||
<a href="/{{id}}">
|
<a href="/{{id}}">
|
||||||
|
|
||||||
{{url}} ({{standard}})
|
{{url}} ({{standard}})
|
||||||
|
|
||||||
|
{{#last_result}}
|
||||||
|
<br/>Last run: {{date}}
|
||||||
|
<br/>Errors: {{count.error}}
|
||||||
|
{{/last_result}}
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{/tasks}}
|
{{/tasks}}
|
||||||
|
Reference in New Issue
Block a user