diff options
author | Pedro Alvarez Piedehierro <palvarez89@gmail.com> | 2017-07-07 01:06:11 +0100 |
---|---|---|
committer | Pedro Alvarez Piedehierro <palvarez89@gmail.com> | 2017-07-10 21:32:58 +0100 |
commit | 10b66de78c883ac1de173c95aa0ad0e862fc7c48 (patch) | |
tree | 818ba819d31cb7b17c2966b169c884adc6b47c8b | |
parent | 710478b6d1b3bb265d99d99c4fd86b7b953c40a0 (diff) | |
download | lorry-controller-10b66de78c883ac1de173c95aa0ad0e862fc7c48.tar.gz |
templates/status: Add column to show failures
-rw-r--r-- | templates/status.tpl | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/templates/status.tpl b/templates/status.tpl index 2665861..0126180 100644 --- a/templates/status.tpl +++ b/templates/status.tpl @@ -104,23 +104,33 @@ <th>Path</th> <th>Interval</th> <th>Due</th> +<th>Last run exit</th> <th>Job?</th> + </tr> % for i, spec in enumerate(run_queue): % obj = json.loads(spec['text']) % name = obj.keys()[0] % fields = obj[name] <tr> -<td>{{i+1}}</td> +<td style="vertical-align:top">{{i+1}}</td> % if links: -<td><a href="/1.0/lorry-html/{{spec['path']}}">{{spec['path']}}</a></td> +<td style="vertical-align:top"><a href="/1.0/lorry-html/{{spec['path']}}">{{spec['path']}}</a></td> % else: -<td>{{spec['path']}}</td> +<td style="vertical-align:top">{{spec['path']}}</td> +% end +<td style="vertical-align:top">{{spec['interval_nice']}}</td> +<td nowrap style="vertical-align:top">{{spec['due_nice']}}</td> +% if publish_failures and spec['last_run_exit'] is not None and spec['last_run_error'] != "": +<td><details> + <summary>{{spec['last_run_exit']}}: Show log</summary> + <p><pre>{{spec['last_run_error']}}</pre></p> +</details></td> +% else: +<td style="vertical-align:top">{{spec['last_run_exit']}}</td> % end -<td>{{spec['interval_nice']}}</td> -<td>{{spec['due_nice']}}</td> % if spec['running_job'] and links: -<td><a href="/1.0/job-html/{{spec['running_job']}}">{{spec['running_job']}}</a></td> +<td style="vertical-align:top"><a href="/1.0/job-html/{{spec['running_job']}}">{{spec['running_job']}}</a></td> % else: <td></td> % end |