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);
|
||||
|
||||
// Error handling
|
||||
app.express.get('*', function (req, res) {
|
||||
res.status(404);
|
||||
res.render('404');
|
||||
});
|
||||
app.express.use(function (err, req, res, next) {
|
||||
/* jshint unused: false */
|
||||
app.emit('route-error', err);
|
||||
res.send('Error');
|
||||
res.status(500);
|
||||
res.render('500');
|
||||
});
|
||||
|
||||
app.server.listen(config.port, function (err) {
|
||||
|
@@ -74,15 +74,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ########### Functionality to be done ############## -->
|
||||
<div class="row">
|
||||
<div class="action-buttons clearfix">
|
||||
<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>
|
||||
<!-- ########### Functionality to be done ############## -->
|
||||
<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>
|
||||
<!-- ##################### End ######################## -->
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -92,11 +93,12 @@
|
||||
<h4 class="crunch-top ruled-sm">Your other tracked URLs</h4>
|
||||
<p>No other urls</p>
|
||||
|
||||
<!-- ########### Functionality to be done ############## -->
|
||||
<!-- <ul class="list-unstyled crunch-bottom">
|
||||
<!-- ########### Functionality to be done ############# -->
|
||||
<ul class="list-unstyled crunch-bottom">
|
||||
<li><a href="empty-task">rowanmanning.com</a></li>
|
||||
<li><a href="task">nature.com</a></li>
|
||||
</ul> -->
|
||||
</ul>
|
||||
<!-- ##################### End ######################## -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user