overview: Cosmetic changes.
* Don't pass unresponsive to the view, access config[] object instead * Remove the statistics header, it only takes up space * Lowercase a few things * Change the descriptions for 'radiator' to make the math work: Because of how PuppetDB's aggregate-events-count works nodes with both successful and failed events count for both causing success + failure + unreported to not equal population, which is weird. Now we're simply stating that they have failed events instead of saying that the node is succesful/failed.
This commit is contained in:
@@ -102,7 +102,7 @@ def index():
|
|||||||
node.noresponse = str(delta.days) + "d " + str(int(delta.seconds/3600)) +"h " + str(int((delta.seconds%3600)/60))+ "m"
|
node.noresponse = str(delta.days) + "d " + str(int(delta.seconds/3600)) +"h " + str(int((delta.seconds%3600)/60))+ "m"
|
||||||
unreported.append(node)
|
unreported.append(node)
|
||||||
|
|
||||||
return render_template('index.html', metrics=metrics, latest_event_count=latest_event_count, latest_events=latest_events, unreported=unreported, unreported_time=app.config['UNRESPONSIVE_HOURS'])
|
return render_template('index.html', metrics=metrics, latest_event_count=latest_event_count, latest_events=latest_events, unreported=unreported)
|
||||||
|
|
||||||
@app.route('/nodes')
|
@app.route('/nodes')
|
||||||
def nodes():
|
def nodes():
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% block row_fluid %}
|
{% block row_fluid %}
|
||||||
<div class="container" style="margin-bottom:55px;">
|
<div class="container" style="margin-bottom:55px;">
|
||||||
<div class="row">
|
|
||||||
<h2>Statistics</h2>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<div class="span4 stat">
|
<div class="span4 stat">
|
||||||
<h1 class="error">{{latest_event_count['failures']}} <small>Failed</small></h1>
|
<h1 class="error">{{latest_event_count['failures']}} <small>node(s)</small></h1>
|
||||||
<span>nodes in the latest reports</span>
|
<span>with failures in latest reports</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="span4 stat">
|
<div class="span4 stat">
|
||||||
<h1 class="success">{{latest_event_count['successes']}} <small>Succeeded</small></h1>
|
<h1 class="success">{{latest_event_count['successes']}} <small>node(s)</small></h1>
|
||||||
<span>nodes in the latest reports</span>
|
<span>with successes in latest reports</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="span4 stat">
|
<div class="span4 stat">
|
||||||
<h1 class="noop">{{ unreported|length }} <small>Unreported</small></h1>
|
<h1 class="noop">{{ unreported|length }} <small>unreported</small></h1>
|
||||||
<span>nodes in the last {{ unreported_time }} hours</span>
|
<span>
|
||||||
|
{% if unreported|length == 1 %} node {% else %} nodes {% endif %}
|
||||||
|
in the last {{ config.UNRESPONSIVE_HOURS }} hours
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h2>Nodes without Report since {{ unreported_time }} hours</h2>
|
<h2>Nodes unresponsive in the last {{ config.UNRESPONSIVE_HOURS }} hours</h2>
|
||||||
<table class='nodes table table-striped table-condensed'>
|
<table class='nodes table table-striped table-condensed'>
|
||||||
<tbody class="searchable">
|
<tbody class="searchable">
|
||||||
{% for node in unreported %}
|
{% for node in unreported %}
|
||||||
@@ -54,7 +53,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h2>Latest Reports with events</h2>
|
<h2>Latest reports with events</h2>
|
||||||
<table class='nodes table table-striped table-condensed'>
|
<table class='nodes table table-striped table-condensed'>
|
||||||
<tbody class="searchable">
|
<tbody class="searchable">
|
||||||
{% for event in latest_events %}
|
{% for event in latest_events %}
|
||||||
|
|||||||
Reference in New Issue
Block a user