mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add full results to the task page
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore');
|
||||
|
||||
module.exports = route;
|
||||
|
||||
// Route definition
|
||||
@@ -13,6 +15,13 @@ function route (app) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
results.forEach(function (result) {
|
||||
var grouped = _.groupBy(result.results, 'code');
|
||||
result.messages = _.keys(grouped).map(function (group) {
|
||||
grouped[group][0].count = grouped[group].length;
|
||||
return grouped[group][0];
|
||||
});
|
||||
});
|
||||
res.render('task', {
|
||||
task: task,
|
||||
results: results,
|
||||
|
Reference in New Issue
Block a user