overview: Add a count, info if nothing is changing
The Nodes status detail now shows for how many nodes we have events. Additionally when there are no events we simply show an alert that nothing is going on.
This commit is contained in:
@@ -52,38 +52,44 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h2>Node Status Detail</h2>
|
{% if nodes %}
|
||||||
<table class='dashboard table table-striped table-condensed'>
|
<h2>Nodes status detail ({{nodes|length}})</h2>
|
||||||
<thead>
|
<table class='dashboard table table-striped table-condensed'>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width:220px;">Status</th>
|
||||||
|
<th style="width:600px;">Hostname</th>
|
||||||
|
<th style="width:120px;"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="searchable">
|
||||||
|
{% for node in nodes %}
|
||||||
|
{% if node.status != 'unchanged' %}
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:220px;">Status</th>
|
<td>
|
||||||
<th style="width:600px;">Hostname</th>
|
<a href="{{url_for('report_latest', node_name=node.name)}}">
|
||||||
<th style="width:120px;"></th>
|
<span class="label label-status label-{{node.status}}">{{node.status}}</span>
|
||||||
|
</a>
|
||||||
|
{% if node.status=='unreported'%}
|
||||||
|
<span class="label label-time label-unreported"> {{ node.unreported_time }} </label>
|
||||||
|
{% else %}
|
||||||
|
{% if node.events['failures'] %}<span class="label label-important label-count">{{node.events['failures']}}</span>{% else %}<span class="label label-count">0</span>{% endif%}
|
||||||
|
{% if node.events['successes'] %}<span class="label label-success label-count">{{node.events['successes']}}</span>{% else %}<span class="label label-count">0</span>{% endif%}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td><a href="{{url_for('node', node_name=node.name)}}">{{ node.name }}</a></td>
|
||||||
|
<td><a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=node.name)}}">Latest Report</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
{% endif %}
|
||||||
<tbody class="searchable">
|
{% endfor %}
|
||||||
{% for node in nodes %}
|
</tbody>
|
||||||
{% if node.status != 'unchanged' %}
|
</table>
|
||||||
<tr>
|
{% else %}
|
||||||
<td>
|
<h2>Nodes status detail</h2>
|
||||||
<a href="{{url_for('report_latest', node_name=node.name)}}">
|
<div class="alert alert-info">
|
||||||
<span class="label label-status label-{{node.status}}">{{node.status}}</span>
|
Nothing seems to be changing.
|
||||||
</a>
|
</div>
|
||||||
{% if node.status=='unreported'%}
|
{% endif %}
|
||||||
<span class="label label-time label-unreported"> {{ node.unreported_time }} </label>
|
|
||||||
{% else %}
|
|
||||||
{% if node.events['failures'] %}<span class="label label-important label-count">{{node.events['failures']}}</span>{% else %}<span class="label label-count">0</span>{% endif%}
|
|
||||||
{% if node.events['successes'] %}<span class="label label-success label-count">{{node.events['successes']}}</span>{% else %}<span class="label label-count">0</span>{% endif%}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td><a href="{{url_for('node', node_name=node.name)}}">{{ node.name }}</a></td>
|
|
||||||
<td><a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=node.name)}}">Latest Report</a></td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user