mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Add 404 and 500 routes
This commit is contained in:
7
app.js
7
app.js
@@ -56,10 +56,15 @@ function initApp (config, callback) {
|
|||||||
require('./route/task')(app);
|
require('./route/task')(app);
|
||||||
|
|
||||||
// Error handling
|
// Error handling
|
||||||
|
app.express.get('*', function (req, res) {
|
||||||
|
res.status(404);
|
||||||
|
res.render('404');
|
||||||
|
});
|
||||||
app.express.use(function (err, req, res, next) {
|
app.express.use(function (err, req, res, next) {
|
||||||
/* jshint unused: false */
|
/* jshint unused: false */
|
||||||
app.emit('route-error', err);
|
app.emit('route-error', err);
|
||||||
res.send('Error');
|
res.status(500);
|
||||||
|
res.render('500');
|
||||||
});
|
});
|
||||||
|
|
||||||
app.server.listen(config.port, function (err) {
|
app.server.listen(config.port, function (err) {
|
||||||
|
@@ -74,15 +74,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ########### Functionality to be done ############## -->
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="action-buttons clearfix">
|
<div class="action-buttons clearfix">
|
||||||
<div class="col-md-12 col-xs-6">
|
<div class="col-md-12 col-xs-6">
|
||||||
<button class="btn-full-width btn btn-default">Download CSV <span class="glyphicon glyphicon-download"></span></button>
|
<a class="btn-full-width btn btn-default">Download CSV <span class="glyphicon glyphicon-download"></span></a>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ########### Functionality to be done ############## -->
|
||||||
<div class="col-md-12 col-xs-6">
|
<div class="col-md-12 col-xs-6">
|
||||||
<button class="btn-full-width btn btn-default">Download JSON <span class="glyphicon glyphicon-download"></span></button>
|
<a href="/{{task.id}}.json" target="_blank" class="btn-full-width btn btn-default">Download JSON <span class="glyphicon glyphicon-download"></span></a>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ##################### End ######################## -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -92,11 +93,12 @@
|
|||||||
<h4 class="crunch-top ruled-sm">Your other tracked URLs</h4>
|
<h4 class="crunch-top ruled-sm">Your other tracked URLs</h4>
|
||||||
<p>No other urls</p>
|
<p>No other urls</p>
|
||||||
|
|
||||||
<!-- ########### Functionality to be done ############## -->
|
<!-- ########### Functionality to be done ############# -->
|
||||||
<!-- <ul class="list-unstyled crunch-bottom">
|
<ul class="list-unstyled crunch-bottom">
|
||||||
<li><a href="empty-task">rowanmanning.com</a></li>
|
<li><a href="empty-task">rowanmanning.com</a></li>
|
||||||
<li><a href="task">nature.com</a></li>
|
<li><a href="task">nature.com</a></li>
|
||||||
</ul> -->
|
</ul>
|
||||||
|
<!-- ##################### End ######################## -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user