mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-25 14:51:28 +00:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
baf73203e9 | ||
![]() |
87daa49638 | ||
![]() |
938ca6090b | ||
![]() |
eda75efc9c | ||
![]() |
ff3755070a | ||
![]() |
06a41ad980 | ||
![]() |
3b4557d75d | ||
![]() |
91a4c8391f | ||
![]() |
d6bc045d52 | ||
![]() |
780b66128f | ||
![]() |
0b1daf1482 | ||
![]() |
57933c074b | ||
![]() |
977dfa9dd0 | ||
![]() |
a94b1a45ae | ||
![]() |
e830d48074 |
@@ -4,6 +4,11 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- "0.10"
|
- "0.10"
|
||||||
|
|
||||||
|
# Build only master (and pull-requests)
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
# Services setup
|
# Services setup
|
||||||
services:
|
services:
|
||||||
- mongodb
|
- mongodb
|
||||||
|
@@ -3,7 +3,7 @@ pa11y-dashboard
|
|||||||
|
|
||||||
pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
|
pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
|
||||||
|
|
||||||
**Current Version:** *1.3.0*
|
**Current Version:** *1.6.0*
|
||||||
**Build Status:** [![Build Status][travis-img]][travis]
|
**Build Status:** [![Build Status][travis-img]][travis]
|
||||||
**Node Version Support:** *0.10*
|
**Node Version Support:** *0.10*
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pa11y-dashboard",
|
"name": "pa11y-dashboard",
|
||||||
"version": "1.3.0",
|
"version": "1.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
||||||
"description": "pa11y-dashboard is a visual web interface to the pa11y accessibility reporter",
|
"description": "pa11y-dashboard is a visual web interface to the pa11y accessibility reporter",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"express": "~3.4",
|
"express": "~3.4",
|
||||||
"express-hbs": "~0.2",
|
"express-hbs": "~0.2",
|
||||||
"moment": "~2.2",
|
"moment": "~2.2",
|
||||||
"pa11y-webservice": "~1.3",
|
"pa11y-webservice": "~1.6",
|
||||||
"pa11y-webservice-client-node": "~1.1",
|
"pa11y-webservice-client-node": "~1.1",
|
||||||
"underscore": "~1.5"
|
"underscore": "~1.5"
|
||||||
},
|
},
|
||||||
|
@@ -192,8 +192,8 @@ $(document).ready(function(){
|
|||||||
'<div class="series-checkbox-container">' +
|
'<div class="series-checkbox-container">' +
|
||||||
'<input type="checkbox"' +
|
'<input type="checkbox"' +
|
||||||
'name="' + key + '" ' +
|
'name="' + key + '" ' +
|
||||||
'checked="checked" ' +
|
'id="id' + key + '" ' +
|
||||||
'id="id' + key + '"' +
|
'data-stat-type="' + val.label.toLowerCase() + '"' +
|
||||||
'/>' +
|
'/>' +
|
||||||
'<label for="id' + key + '">' +
|
'<label for="id' + key + '">' +
|
||||||
'<span class="stat-type">' + val.label + '</span>' +
|
'<span class="stat-type">' + val.label + '</span>' +
|
||||||
@@ -201,9 +201,11 @@ $(document).ready(function(){
|
|||||||
'</div>' +
|
'</div>' +
|
||||||
'</li>'
|
'</li>'
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
choiceContainer.find('input').click(plotAccordingToChoices);
|
choiceContainer.find('input').click(plotAccordingToChoices);
|
||||||
|
choiceContainer.find('[data-stat-type=errors]').click();
|
||||||
|
|
||||||
function plotAccordingToChoices() {
|
function plotAccordingToChoices() {
|
||||||
var data = [];
|
var data = [];
|
||||||
|
12
public/js/site.min.js
vendored
12
public/js/site.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -40,7 +40,10 @@ function route (app) {
|
|||||||
name: req.body.name,
|
name: req.body.name,
|
||||||
url: req.body.url,
|
url: req.body.url,
|
||||||
standard: req.body.standard,
|
standard: req.body.standard,
|
||||||
ignore: req.body.ignore || []
|
ignore: req.body.ignore || [],
|
||||||
|
timeout: req.body.timeout,
|
||||||
|
username: req.body.username,
|
||||||
|
password: req.body.password
|
||||||
};
|
};
|
||||||
app.webservice.tasks.create(newTask, function (err, task) {
|
app.webservice.tasks.create(newTask, function (err, task) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@@ -60,6 +60,9 @@ function route (app) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
task.name = req.body.name;
|
task.name = req.body.name;
|
||||||
task.ignore = req.body.ignore;
|
task.ignore = req.body.ignore;
|
||||||
|
task.timeout = req.body.timeout;
|
||||||
|
task.username = req.body.username;
|
||||||
|
task.password = req.body.password;
|
||||||
var standards = getStandards().map(function (standard) {
|
var standards = getStandards().map(function (standard) {
|
||||||
if (standard.title === task.standard) {
|
if (standard.title === task.standard) {
|
||||||
standard.selected = true;
|
standard.selected = true;
|
||||||
|
@@ -64,6 +64,20 @@ describe('GET /new', function () {
|
|||||||
assert.strictEqual(field.getAttribute('value'), '');
|
assert.strictEqual(field.getAttribute('value'), '');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have a "username" field', function () {
|
||||||
|
var field = this.form.querySelectorAll('input[name=username]')[0];
|
||||||
|
assert.isDefined(field);
|
||||||
|
assert.strictEqual(field.getAttribute('type'), 'text');
|
||||||
|
assert.strictEqual(field.getAttribute('value'), '');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a "password" field', function () {
|
||||||
|
var field = this.form.querySelectorAll('input[name=password]')[0];
|
||||||
|
assert.isDefined(field);
|
||||||
|
assert.strictEqual(field.getAttribute('type'), 'text');
|
||||||
|
assert.strictEqual(field.getAttribute('value'), '');
|
||||||
|
});
|
||||||
|
|
||||||
it('should have a "standard" field', function () {
|
it('should have a "standard" field', function () {
|
||||||
var field = this.form.querySelectorAll('select[name=standard]')[0];
|
var field = this.form.querySelectorAll('select[name=standard]')[0];
|
||||||
assert.isDefined(field);
|
assert.isDefined(field);
|
||||||
|
@@ -71,6 +71,20 @@ describe('GET /<task-id>/edit', function () {
|
|||||||
assert.isDefined(field.getAttribute('disabled'));
|
assert.isDefined(field.getAttribute('disabled'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have a "username" field', function () {
|
||||||
|
var field = this.form.querySelectorAll('input[name=username]')[0];
|
||||||
|
assert.isDefined(field);
|
||||||
|
assert.strictEqual(field.getAttribute('type'), 'text');
|
||||||
|
assert.strictEqual(field.getAttribute('value'), 'user');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should have a "password" field', function () {
|
||||||
|
var field = this.form.querySelectorAll('input[name=password]')[0];
|
||||||
|
assert.isDefined(field);
|
||||||
|
assert.strictEqual(field.getAttribute('type'), 'text');
|
||||||
|
assert.strictEqual(field.getAttribute('value'), 'access');
|
||||||
|
});
|
||||||
|
|
||||||
it('should have "ignore" fields', function () {
|
it('should have "ignore" fields', function () {
|
||||||
var fields = this.form.querySelectorAll('input[name="ignore[]"]');
|
var fields = this.form.querySelectorAll('input[name="ignore[]"]');
|
||||||
assert.isDefined(fields);
|
assert.isDefined(fields);
|
||||||
@@ -89,6 +103,8 @@ describe('POST /<task-id>/edit', function () {
|
|||||||
endpoint: '/abc000000000000000000001/edit',
|
endpoint: '/abc000000000000000000001/edit',
|
||||||
body: {
|
body: {
|
||||||
name: 'foo',
|
name: 'foo',
|
||||||
|
username: 'newuser',
|
||||||
|
password: 'secure',
|
||||||
ignore: ['bar', 'baz']
|
ignore: ['bar', 'baz']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -102,6 +118,8 @@ describe('POST /<task-id>/edit', function () {
|
|||||||
it('should edit the task', function (done) {
|
it('should edit the task', function (done) {
|
||||||
this.webservice.task('abc000000000000000000001').get({}, function (err, task) {
|
this.webservice.task('abc000000000000000000001').get({}, function (err, task) {
|
||||||
assert.strictEqual(task.name, 'foo');
|
assert.strictEqual(task.name, 'foo');
|
||||||
|
assert.strictEqual(task.username, 'newuser');
|
||||||
|
assert.strictEqual(task.password, 'secure');
|
||||||
assert.deepEqual(task.ignore, ['bar', 'baz']);
|
assert.deepEqual(task.ignore, ['bar', 'baz']);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@@ -16,23 +16,37 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
}}
|
}}
|
||||||
{{#content "title"}}pa11y-dashboard{{/content}}
|
{{#content "title"}}pa11y-dashboard{{/content}}
|
||||||
|
|
||||||
{{#if siteMessage}}
|
<div data-control="task-list">
|
||||||
<div class="col-md-12 clearfix" data-test="alert">
|
|
||||||
<div class="alert alert-info site-message">
|
|
||||||
<h3 class="crunch-top"><span class="pull-left glyphicon glyphicon-exclamation-sign"></span> Important</h3>
|
|
||||||
<p class="h5">{{siteMessage}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#deleted}}
|
<div class="clearfix">
|
||||||
<div class="col-md-12 clearfix" data-test="alert">
|
<div class="col-md-6 col-md-offset-3 filter-toggle no-js-hide text-center">
|
||||||
<div class="alert alert-info">
|
<label for="filter-input" class="filter-trigger" data-toggle="collapse" data-target="#filter-input">Filter<span class="glyphicon glyphicon-filter"></span>
|
||||||
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
|
</label>
|
||||||
<strong>Bye Bye URL</strong>
|
<div id="filter-input" class="collapse">
|
||||||
<p>The URL you selected and its associated results have been deleted.</p>
|
<input class="form-control" id="task-filter" type="text" data-role="input" placeholder="Type filter term (name or standard)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/deleted}}
|
</div>
|
||||||
|
|
||||||
{{> tasks}}
|
{{#if siteMessage}}
|
||||||
|
<div class="col-md-12 clearfix" data-test="alert">
|
||||||
|
<div class="alert alert-info site-message">
|
||||||
|
<h3 class="crunch-top"><span class="pull-left glyphicon glyphicon-exclamation-sign"></span> Important</h3>
|
||||||
|
<p class="h5">{{siteMessage}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#deleted}}
|
||||||
|
<div class="col-md-12 clearfix" data-test="alert">
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
|
||||||
|
<strong>Bye Bye URL</strong>
|
||||||
|
<p>The URL you selected and its associated results have been deleted.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/deleted}}
|
||||||
|
|
||||||
|
{{> tasks}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@@ -65,6 +65,33 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-timeout">Timeout (milliseconds)</label>
|
||||||
|
<input class="form-control" id="new-task-timeout" type="text" placeholder="E.g. 30000" name="timeout" value="{{task.timeout}}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-username">Username</label>
|
||||||
|
<input class="form-control" id="new-task-username" type="text" name="username" value="{{task.username}}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-password">Password</label>
|
||||||
|
<input class="form-control" id="new-task-password" type="text" name="password" value="{{task.password}}"/> <em>(Note: this will be stored and displayed in plain-text - only suitable for use in a secure environment)</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="control-label"><b>Ignore these rules</b> <a target="_blank" href="https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules">(full list of rules here)</a></p>
|
<p class="control-label"><b>Ignore these rules</b> <a target="_blank" href="https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules">(full list of rules here)</a></p>
|
||||||
|
|
||||||
<div class="standards-lists">
|
<div class="standards-lists">
|
||||||
|
@@ -15,61 +15,49 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
|
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<div data-control="task-list">
|
<ul class="list-unstyled clearfix crunch-bottom">
|
||||||
|
<li class="col-md-4 col-sm-6 task-card add-task">
|
||||||
<div class="col-md-6 col-md-offset-3 filter-toggle no-js-hide text-center">
|
{{#if readonly}}
|
||||||
<label for="filter-input" class="filter-trigger" data-toggle="collapse" data-target="#filter-input">Filter<span class="glyphicon glyphicon-filter"></span>
|
<span class="well task-card-link crunch-bottom">
|
||||||
</label>
|
<p class="h3 crunch">Add new URL</p>
|
||||||
<div id="filter-input" class="collapse">
|
<p class="supersize-me crunch">+</p>
|
||||||
<input class="form-control" id="task-filter" type="text" data-role="input" placeholder="Type filter term (name or standard)"/>
|
</span>
|
||||||
</div>
|
{{else}}
|
||||||
</div>
|
<a class="well task-card-link crunch-bottom" data-role="add-task" href="/new" data-test="add-task">
|
||||||
|
<p class="h3 crunch">Add new URL</p>
|
||||||
<ul class="list-unstyled clearfix crunch-bottom">
|
<p class="supersize-me crunch">+</p>
|
||||||
<li class="col-md-4 col-sm-6 task-card add-task">
|
</a>
|
||||||
{{#if readonly}}
|
{{/if}}
|
||||||
<span class="well task-card-link crunch-bottom">
|
</li>
|
||||||
<p class="h3 crunch">Add new URL</p>
|
{{#each tasks}}
|
||||||
<p class="supersize-me crunch">+</p>
|
<li class="col-md-4 col-sm-6 task-card" data-test="task" data-role="task" data-keywords="{{lowercase name}} {{lowercase standard}} {{simplify-url url}}">
|
||||||
</span>
|
<a class="well task-card-link crunch-bottom" title="Details for URL {{simplify-url url}}" href="{{href}}">
|
||||||
{{else}}
|
<p class="h3">{{name}}</p>
|
||||||
<a class="well task-card-link crunch-bottom" data-role="add-task" href="/new" data-test="add-task">
|
<p class="h5">({{standard}})</p>
|
||||||
<p class="h3 crunch">Add new URL</p>
|
{{#if lastResult}}
|
||||||
<p class="supersize-me crunch">+</p>
|
<ul class="clearfix list-unstyled floated-list task-stats">
|
||||||
</a>
|
{{#lastResult}}
|
||||||
{{/if}}
|
<li class="danger" title="Number of errors ({{count.error}})">{{count.error}}<span class="stat-type">Errors</span></li>
|
||||||
|
<li class="warning" title="Number of warnings ({{count.warning}})">{{count.warning}}<span class="stat-type">Warnings</span></li>
|
||||||
|
<li class="info last" title="Number of notices ({{count.notice}})">{{count.notice}}<span class="stat-type">Notices</span></li>
|
||||||
|
{{/lastResult}}
|
||||||
|
</ul>
|
||||||
|
Last run {{date-format lastResult.date format="DD MMM YYYY"}}
|
||||||
|
{{else}}
|
||||||
|
<p class="no-results">No results</p>
|
||||||
|
{{/if}}
|
||||||
|
</a>
|
||||||
|
{{#unless ../readonly}}
|
||||||
|
<div class="btn-group options-button text-right">
|
||||||
|
<button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown"><span class="sr-only">Options</span><span class="glyphicon glyphicon-cog"></span></button>
|
||||||
|
<ul class="dropdown-menu pull-right" role="menu">
|
||||||
|
<li><a href="{{href}}/edit">Edit this task</a></li>
|
||||||
|
<li><a href="{{href}}/delete">Delete this task</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li><a href="{{href}}/run" data-test="run-task">Run pa11y</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
</li>
|
</li>
|
||||||
{{#each tasks}}
|
{{/each}}
|
||||||
<li class="col-md-4 col-sm-6 task-card" data-test="task" data-role="task" data-keywords="{{lowercase name}} {{lowercase standard}} {{simplify-url url}}">
|
</ul>
|
||||||
<a class="well task-card-link crunch-bottom" title="Details for URL {{simplify-url url}}" href="{{href}}">
|
|
||||||
<p class="h3">{{name}}</p>
|
|
||||||
<p class="h5">({{standard}})</p>
|
|
||||||
{{#if lastResult}}
|
|
||||||
<ul class="clearfix list-unstyled floated-list task-stats">
|
|
||||||
{{#lastResult}}
|
|
||||||
<li class="danger" title="Number of errors ({{count.error}})">{{count.error}}<span class="stat-type">Errors</span></li>
|
|
||||||
<li class="warning" title="Number of warnings ({{count.warning}})">{{count.warning}}<span class="stat-type">Warnings</span></li>
|
|
||||||
<li class="info last" title="Number of notices ({{count.notice}})">{{count.notice}}<span class="stat-type">Notices</span></li>
|
|
||||||
{{/lastResult}}
|
|
||||||
</ul>
|
|
||||||
Last run {{date-format lastResult.date format="DD MMM YYYY"}}
|
|
||||||
{{else}}
|
|
||||||
<p class="no-results">No results</p>
|
|
||||||
{{/if}}
|
|
||||||
</a>
|
|
||||||
{{#unless ../readonly}}
|
|
||||||
<div class="btn-group options-button text-right">
|
|
||||||
<button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown"><span class="sr-only">Options</span><span class="glyphicon glyphicon-cog"></span></button>
|
|
||||||
<ul class="dropdown-menu pull-right" role="menu">
|
|
||||||
<li><a href="{{href}}/edit">Edit this task</a></li>
|
|
||||||
<li><a href="{{href}}/delete">Delete this task</a></li>
|
|
||||||
<li class="divider"></li>
|
|
||||||
<li><a href="{{href}}/run" data-test="run-task">Run pa11y</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
@@ -77,6 +77,33 @@ along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-timeout">Timeout (milliseconds)</label>
|
||||||
|
<input class="form-control" id="new-task-timeout" type="text" placeholder="E.g. 30000" name="timeout" value="{{task.timeout}}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-username">Username</label>
|
||||||
|
<input class="form-control" id="new-task-username" type="text" name="username" value="{{task.username}}"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group clearfix">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-4 col-xs-6">
|
||||||
|
<label class="control-label" for="new-task-password">Password</label>
|
||||||
|
<input class="form-control" id="new-task-password" type="text" name="password" value="{{task.password}}"/> <em>(Note: this will be stored and displayed in plain-text - only suitable for use in a secure environment)</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p class="control-label"><b>Ignore these rules</b> <a target="_blank" href="https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules">(full list of rules here)</a></p>
|
<p class="control-label"><b>Ignore these rules</b> <a target="_blank" href="https://github.com/nature/pa11y/wiki/HTML-CodeSniffer-Rules">(full list of rules here)</a></p>
|
||||||
|
|
||||||
<div class="standards-lists">
|
<div class="standards-lists">
|
||||||
|
Reference in New Issue
Block a user