make server template more robust if there are no checks available
This commit is contained in:
parent
2bcd14006c
commit
02c24b67f7
1 changed files with 25 additions and 23 deletions
|
@ -20,30 +20,32 @@
|
||||||
<th>output</th>
|
<th>output</th>
|
||||||
<th>last try</th>
|
<th>last try</th>
|
||||||
<th>last successful</th>
|
<th>last successful</th>
|
||||||
{% for check in server.get('check_results') %}
|
{% if server.get('check_results') != None %}
|
||||||
<tr>
|
{% for check in server.get('check_results', []) %}
|
||||||
<td>
|
<tr>
|
||||||
{{ check.get('name') }}
|
<td>
|
||||||
</td>
|
{{ check.get('name') }}
|
||||||
<td class="status_{{ check.get('state') }}">
|
</td>
|
||||||
{{ check.get('state') }}
|
<td class="status_{{ check.get('state') }}">
|
||||||
</td>
|
{{ check.get('state') }}
|
||||||
<td>
|
</td>
|
||||||
{{ check.get('command') | join(' ') }}
|
<td>
|
||||||
</td>
|
{{ check.get('command') | join(' ') }}
|
||||||
<td>
|
</td>
|
||||||
{{ check.get('output').get('output_text') }}
|
<td>
|
||||||
</td>
|
{{ check.get('output').get('output_text') }}
|
||||||
<td>
|
</td>
|
||||||
{{ check.get('last_exec_start') }}
|
<td>
|
||||||
</td>
|
{{ check.get('last_exec_start') }}
|
||||||
<td>
|
</td>
|
||||||
{{ check.get('last_exec_finish') }}
|
<td>
|
||||||
</td>
|
{{ check.get('last_exec_finish') }}
|
||||||
</tr>
|
</td>
|
||||||
{% endfor %}
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue