diff --git a/puppetboard/app.py b/puppetboard/app.py index 18a8a9a..e4bbc80 100644 --- a/puppetboard/app.py +++ b/puppetboard/app.py @@ -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" 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') def nodes(): diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index d3c0c9d..5701b8c 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -1,23 +1,22 @@ {% extends 'layout.html' %} {% block row_fluid %}
-
-

Statistics

-
-
-

{{latest_event_count['failures']}} Failed

- nodes in the latest reports +

{{latest_event_count['failures']}} node(s)

+ with failures in latest reports
-

{{latest_event_count['successes']}} Succeeded

- nodes in the latest reports +

{{latest_event_count['successes']}} node(s)

+ with successes in latest reports
-

{{ unreported|length }} Unreported

- nodes in the last {{ unreported_time }} hours +

{{ unreported|length }} unreported

+ + {% if unreported|length == 1 %} node {% else %} nodes {% endif %} + in the last {{ config.UNRESPONSIVE_HOURS }} hours +
@@ -41,7 +40,7 @@
-

Nodes without Report since {{ unreported_time }} hours

+

Nodes unresponsive in the last {{ config.UNRESPONSIVE_HOURS }} hours

{% for node in unreported %} @@ -54,7 +53,7 @@ {% endfor %}
-

Latest Reports with events

+

Latest reports with events

{% for event in latest_events %}