Compare commits

...

17 Commits
1.3.1 ... 1.6.1

Author SHA1 Message Date
Alex Kilgour
32a8ec55e1 Version 1.6.1 2016-01-26 16:00:27 +00:00
Alex Kilgour
0829482020 Merge pull request #92 from nature/keyboard-access
Keyboard access
2016-01-26 14:38:08 +00:00
Alex Kilgour
eb8f35779e revert spacing issue with public/js/site.js 2016-01-26 14:13:42 +00:00
Alex Kilgour
3cdbba00c1 Fix linting errors in the Javascript 2016-01-26 14:04:12 +00:00
Alex Kilgour
fd2dd62478 Add keyboard access for filters 2016-01-26 13:52:38 +00:00
Rowan Manning
baf73203e9 Version 1.6.0 2015-08-20 16:05:31 +01:00
Rowan Manning
87daa49638 Hide all graph data except for errors by default 2015-08-20 14:54:44 +01:00
Rowan Manning
938ca6090b Version 1.5.0 2015-07-06 10:14:53 +01:00
Rowan Manning
eda75efc9c Update pa11y-webservice 2015-07-06 10:11:38 +01:00
Rowan Manning
ff3755070a Merge branch 'http-basic-auth' 2015-07-06 10:09:24 +01:00
Andrew Mee
06a41ad980 adding a notice that passwords are not securely stored when provided through the dashboard 2015-07-06 09:58:24 +01:00
Rowan Manning
3b4557d75d Build only master and PRs on CI 2015-07-06 09:39:42 +01:00
Andrew Mee
91a4c8391f adding ability to provide username and password when creating new task 2015-07-03 16:23:45 +01:00
Rowan Manning
d6bc045d52 Version 1.4.0 2015-07-02 16:52:40 +01:00
Rowan Manning
780b66128f Add the ability to set a per-task timeout 2015-07-02 16:03:12 +01:00
Rowan Manning
0b1daf1482 Version 1.3.2 2015-01-17 18:37:03 +00:00
Rowan Manning
57933c074b Update pa11y-webservice dependency 2015-01-17 18:35:35 +00:00
13 changed files with 152 additions and 28 deletions

View File

@@ -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

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // 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/>.
@@ -28,7 +28,7 @@ module.exports = function (grunt) {
es3: false, es3: false,
indent: 4, indent: 4,
latedef: false, latedef: false,
maxcomplexity: 4, maxcomplexity: 6,
maxdepth: 2, maxdepth: 2,
maxlen: 100, maxlen: 100,
maxparams: 4, maxparams: 4,

View File

@@ -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.1* **Current Version:** *1.6.1*
**Build Status:** [![Build Status][travis-img]][travis] **Build Status:** [![Build Status][travis-img]][travis]
**Node Version Support:** *0.10* **Node Version Support:** *0.10*

View File

@@ -1,6 +1,6 @@
{ {
"name": "pa11y-dashboard", "name": "pa11y-dashboard",
"version": "1.3.1", "version": "1.6.1",
"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"
}, },

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // 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/>.
@@ -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 = [];
@@ -286,4 +288,29 @@ $(document).ready(function(){
}); });
} }
// Extend public/js/vendor/bootstrap/js/collapse.js
// Add keyboard control for filters
$.fn.collapse.Constructor.prototype.keydown = function (e) {
var $this = $(this);
var k = e.which || e.keyCode;
if (!/(13|32)/.test(k)) {
return;
}
if (k === 13 || k === 32) {
$this.click();
}
e.preventDefault();
e.stopPropagation();
};
$('[data-toggle="collapse"]').attr('role', 'button').attr('tabindex', 0);
$(document).on(
'keydown.collapse.data-api',
'[data-toggle="collapse"]',
$.fn.collapse.Constructor.prototype.keydown
);
}); });

12
public/js/site.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // 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/>.
@@ -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) {

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // 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/>.
@@ -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;

View File

@@ -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);

View File

@@ -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();
}); });

View File

@@ -1,4 +1,4 @@
{{! {{!
This file is part of pa11y-dashboard. This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify pa11y-dashboard is free software: you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
{{! {{!
This file is part of pa11y-dashboard. This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify pa11y-dashboard is free software: you can redistribute it and/or modify
@@ -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">

View File

@@ -1,4 +1,4 @@
{{! {{!
This file is part of pa11y-dashboard. This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify pa11y-dashboard is free software: you can redistribute it and/or modify
@@ -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">