show list of nodes without report for x hours in overview
- the amount of hours is defined as `UNRESPONSIVE_HOURS` in default_settings.py - small status layout improvement in nodes list - latest report button in nodes list - nedap/pypuppetdb repo as requirement ( new api was merged nedap/pypuppetdb#17 )
This commit is contained in:
@@ -8,16 +8,16 @@
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<div class="span4 stat">
|
||||
<h1 class="error">{{latest_event_count['failures']}} Failures</h1>
|
||||
<span>in the latest node reports</span>
|
||||
<h1 class="error">{{latest_event_count['failures']}} <small>Failed</small></h1>
|
||||
<span>nodes in the latest reports</span>
|
||||
</div>
|
||||
<div class="span4 stat">
|
||||
<h1 class="success">{{latest_event_count['successes']}} Successes</h1>
|
||||
<span>in the latest node reports</span>
|
||||
<h1 class="success">{{latest_event_count['successes']}} <small>Succeeded</small></h1>
|
||||
<span>nodes in the latest reports</span>
|
||||
</div>
|
||||
<div class="span4 stat">
|
||||
<h1 class="noop">{{latest_event_count['noopskip']}} Noop/Skip</h1>
|
||||
<span>in the latest node reports</span>
|
||||
<h1 class="noop">{{ unreported|length }} <small>Unreported</small></h1>
|
||||
<span>nodes in the last {{ unreported_time }} hours</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,21 +53,34 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h2>Nodes without Report since {{ unreported_time }} hours</h2>
|
||||
<table class='nodes table table-striped table-condensed'>
|
||||
<tbody class="searchable">
|
||||
{% for node in unreported %}
|
||||
<tr>
|
||||
<td style="width:110px;"><span class="label label-important">No Report</span></td>
|
||||
<td>{{ node.noresponse }}</td>
|
||||
<td><a href="{{url_for('node', node_name=node.name)}}">{{ node.name }}</a></td>
|
||||
<td style="width:120px;"><a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=node.name)}}">Latest Report</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<h2>Latest Reports with events</h2>
|
||||
<hr />
|
||||
<table class='nodes table table-striped table-condensed'>
|
||||
<tbody class="searchable">
|
||||
{% for event in latest_events %}
|
||||
<tr>
|
||||
|
||||
<td>{% if event['failures'] %}<span class="label label-important numtag">{{event['failures']}}</span>{% endif%}</td>
|
||||
<td>{% if event['successes'] %}<span class="label label-success numtag">{{event['successes']}}</span>{% endif%}</td>
|
||||
<td style="width:730px;"><a href="{{url_for('node', node_name=event['subject']['title'])}}">{{event['subject']['title']}}</a></td>
|
||||
<td><a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=event['subject']['title'])}}">Latest Report</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<table class='nodes table table-striped table-condensed'>
|
||||
<tbody class="searchable">
|
||||
{% for event in latest_events %}
|
||||
<tr>
|
||||
<td style="width:110px;">
|
||||
{% if event['failures'] %}<span class="label label-important numtag">{{event['failures']}}</span>{% else %}<span class="label numtag">0</span>{% endif%}
|
||||
{% if event['successes'] %}<span class="label label-success numtag">{{event['successes']}}</span>{% else %}<span class="label numtag">0</span>{% endif%}
|
||||
</td>
|
||||
<td style="width:700px;"><a href="{{url_for('node', node_name=event['subject']['title'])}}">{{event['subject']['title']}}</a></td>
|
||||
<td style="width:120px;"><a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=event['subject']['title'])}}">Latest Report</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<table class='nodes table table-striped table-condensed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width>Status</th>
|
||||
<th>Status</th>
|
||||
<th>Hostname</th>
|
||||
<th>Catalog compiled at</th>
|
||||
{% if config.PUPPETDB_API > 2 %}
|
||||
@@ -30,15 +30,11 @@
|
||||
<tbody class="searchable">
|
||||
{% for node in nodes %}
|
||||
<tr>
|
||||
<td><a href="{{url_for('report_latest', node_name=node.name)}}">
|
||||
{% if node.status %}
|
||||
{% if node.status['failures'] %}<span class="label label-important">{{node.status['failures']}}</span>{% endif %}
|
||||
{% if node.status['successes'] %}<span class="label label-success">{{node.status['successes']}}</span>{% endif %}
|
||||
{% if node.status['noops'] or node.status['skips'] %}<span class="label">{{node.status['skips']+node.status['noops']}}</span>{% endif %}
|
||||
{% else %}
|
||||
<span class="label">0</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
<td><a href="{{url_for('report_latest', node_name=node.name)}}">
|
||||
{% if node.status['failures'] %}<span class="label numtag label-important">{{node.status['failures']}}</span>{% else %}<span class="label label-nothing">0</span>{% endif %}
|
||||
{% if node.status['successes'] %}<span class="label numtag label-success">{{node.status['successes']}}</span>{% else %}<span class="label label-nothing">0</span>{% endif %}
|
||||
{% if node.status['noops'] or node.status['skips'] %}<span class="label numtag">{{node.status['skips']+node.status['noops']}}</span>{% else %}<span class="label label-nothing">0</span>{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="{{url_for('node', node_name=node.name)}}">{{node.name}}</a></td>
|
||||
<td rel="utctimestamp">{{node.catalog_timestamp}}</td>
|
||||
@@ -52,6 +48,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{% if node.report_timestamp %}
|
||||
<a class="btn btn-small btn-primary" href="{{url_for('report_latest', node_name=node.name)}}">Latest Report</a>
|
||||
<a class="btn btn-small btn-primary" href="{{url_for('reports_node', node=node.name)}}">Reports</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user