Add the ability to run tasks ad-hoc

This commit is contained in:
Rowan Manning
2013-10-03 14:18:31 +01:00
parent cd38bd0586
commit c2ed1beb0e
7 changed files with 37 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
<p class="h4">({{task.standard}})</p>
</div>
<div class="col-md-2 text-right run-details">
<!-- <button class="btn btn-success">Run <span class="glyphicon glyphicon-play"></span></button> -->
<a href="{{task.hrefRun}}" class="btn btn-success">Run <span class="glyphicon glyphicon-play"></span></a>
{{#if mainResult}}
<div class="date">Last run : {{date-format mainResult.date format="DD MMM YYYY"}}</div>
{{else}}

View File

@@ -12,6 +12,7 @@ function presentTask (task) {
// Add additional info
task.href = '/' + task.id;
task.hrefDelete = '/' + task.id + '/delete';
task.hrefRun = '/' + task.id + '/run';
task.hrefJson = '/' + task.id + '.json';
// Enhance the ignored rules

View File

@@ -13,6 +13,20 @@
</div>
{{/added}}
{{#running}}
<div class="col-md-12 clearfix">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<strong>New results incoming!</strong>
<p>
New results are being generated for this URL in the background.
This can take up to a minute to complete.
<a href="/{{task.id}}">Click here to refresh this page</a>.
</p>
</div>
</div>
{{/running}}
{{> task-header}}
{{#if results}}
@@ -30,7 +44,7 @@
<div class="alert alert-info">
<h4>There are no results to show</h4>
<p>pa11y has not been run against this URL yet so there are no results to show.</p>
<!-- <p>To run pa11y for this URL now <a href="">click here</a></p> -->
<p><a href="{{task.hrefRun}}">Click here to generate results for this URL</a>.</p>
</div>
</div>
{{/if}}