From 4c50b82768c1546eb7fa4e570f5f620936874189 Mon Sep 17 00:00:00 2001 From: Anna Janackova Date: Fri, 25 Apr 2014 16:25:42 +0200 Subject: [PATCH] adds pending nodes counter to the main dashboard * nodes with state noop are counted towards the "pending" column in the main dashboard * changes top layout to four-column --- puppetboard/app.py | 3 +++ puppetboard/templates/index.html | 17 +++++++++++++++-- puppetboard/templates/nodes.html | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/puppetboard/app.py b/puppetboard/app.py index ed1a52f..c203b6f 100644 --- a/puppetboard/app.py +++ b/puppetboard/app.py @@ -116,6 +116,7 @@ def index(): 'unchanged': 0, 'failed': 0, 'unreported': 0, + 'noop': 0 } for node in nodes: @@ -125,6 +126,8 @@ def index(): stats['changed'] += 1 elif node.status == 'failed': stats['failed'] += 1 + elif node.status == 'noop': + stats['noop'] += 1 else: stats['unchanged'] += 1 diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index 2aac1fd..a7dec4e 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block content %}
-