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="span12">
|
||||
<h2>Node Status Detail</h2>
|
||||
<table class='dashboard table table-striped table-condensed'>
|
||||
<thead>
|
||||
{% if nodes %}
|
||||
<h2>Nodes status detail ({{nodes|length}})</h2>
|
||||
<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>
|
||||
<th style="width:220px;">Status</th>
|
||||
<th style="width:600px;">Hostname</th>
|
||||
<th style="width:120px;"></th>
|
||||
<td>
|
||||
<a href="{{url_for('report_latest', node_name=node.name)}}">
|
||||
<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>
|
||||
</thead>
|
||||
<tbody class="searchable">
|
||||
{% for node in nodes %}
|
||||
{% if node.status != 'unchanged' %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{url_for('report_latest', node_name=node.name)}}">
|
||||
<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>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<h2>Nodes status detail</h2>
|
||||
<div class="alert alert-info">
|
||||
Nothing seems to be changing.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user