From e753fc444a095741d47596f5067c8534a36ccb77 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Tue, 5 Nov 2013 12:12:49 +0100 Subject: [PATCH] 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. --- puppetboard/templates/index.html | 66 +++++++++++++++++--------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index 06f6570..2810c20 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -52,38 +52,44 @@
-

Node Status Detail

- - + {% if nodes %} +

Nodes status detail ({{nodes|length}})

+
+ + + + + + + + + {% for node in nodes %} + {% if node.status != 'unchanged' %} - - - + + + - - - {% for node in nodes %} - {% if node.status != 'unchanged' %} - - - - - - {% endif %} - {% endfor %} - -
StatusHostname
StatusHostname + + {{node.status}} + + {% if node.status=='unreported'%} + {{ node.unreported_time }} + {% else %} + {% if node.events['failures'] %}{{node.events['failures']}}{% else %}0{% endif%} + {% if node.events['successes'] %}{{node.events['successes']}}{% else %}0{% endif%} + {% endif %} + {{ node.name }}Latest Report
- - {{node.status}} - - {% if node.status=='unreported'%} - {{ node.unreported_time }} - {% else %} - {% if node.events['failures'] %}{{node.events['failures']}}{% else %}0{% endif%} - {% if node.events['successes'] %}{{node.events['successes']}}{% else %}0{% endif%} - {% endif %} - {{ node.name }}Latest Report
- + {% endif %} + {% endfor %} + + + {% else %} +

Nodes status detail

+
+ Nothing seems to be changing. +
+ {% endif %}