diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/failures.tpl | 45 | ||||
-rw-r--r-- | templates/status.tpl | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/templates/failures.tpl b/templates/failures.tpl new file mode 100644 index 0000000..5c7b6ce --- /dev/null +++ b/templates/failures.tpl @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Failing lorries</title> + <link rel="stylesheet" href="/lc-static/style.css" type="text/css" /> + </head> + <body> + <h1>Failing lorries</h1> + + <p>See the <a href="/1.0/status-html">full status</a>.</p> + + <table> + <tr> + <th>Path</th> + <th>Due</th> + <th>Last run exit</th> + <th>Job?</th> + </tr> +% failures = [spec for spec in run_queue +% if spec['last_run_exit'] not in [None, '0']] +% for spec in sorted(failures, key=(lambda spec: spec['path'])): + <tr> + <td><a href="/1.0/lorry-html/{{spec['path']}}">{{spec['path']}}</a></td> + <td nowrap>{{spec['due_nice']}}</td> + <td> + <details> + <summary>{{spec['last_run_exit']}}: Show log</summary> + <p><pre>{{spec['last_run_error']}}</pre></p> + </details> + </td> +% if spec['running_job']: + <td><a href="/1.0/job-html/{{spec['running_job']}}">{{spec['running_job']}}</a></td> +% else: + <td></td> +% end + </tr> +% end + </table> + + <hr> + + <p>Updated: {{timestamp}}</p> + + </body> +</html> diff --git a/templates/status.tpl b/templates/status.tpl index ff572de..61c3aa9 100644 --- a/templates/status.tpl +++ b/templates/status.tpl @@ -100,6 +100,8 @@ % if links: <p>See separate list of <a href="/1.0/list-jobs-html">all jobs that have ever been started</a>.</p> + +<p>See the list of <a href="/1.0/failures-html">failing lorries</a>.</p> % end <h2>Run-queue</h2> |