Merge pull request #69 from tilya/node_state_noop
adds pending nodes counter to the main dashboard (#58)
This commit is contained in:
@@ -116,6 +116,7 @@ def index():
|
|||||||
'unchanged': 0,
|
'unchanged': 0,
|
||||||
'failed': 0,
|
'failed': 0,
|
||||||
'unreported': 0,
|
'unreported': 0,
|
||||||
|
'noop': 0
|
||||||
}
|
}
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
@@ -125,6 +126,8 @@ def index():
|
|||||||
stats['changed'] += 1
|
stats['changed'] += 1
|
||||||
elif node.status == 'failed':
|
elif node.status == 'failed':
|
||||||
stats['failed'] += 1
|
stats['failed'] += 1
|
||||||
|
elif node.status == 'noop':
|
||||||
|
stats['noop'] += 1
|
||||||
else:
|
else:
|
||||||
stats['unchanged'] += 1
|
stats['unchanged'] += 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="ui vertical grid">
|
<div class="ui vertical grid">
|
||||||
<div class="three column row">
|
<div class="four column row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<a href="nodes?status=failed">
|
<a href="nodes?status=failed">
|
||||||
<h1 class="ui red header no-margin-bottom">
|
<h1 class="ui red header no-margin-bottom">
|
||||||
@@ -11,6 +11,15 @@
|
|||||||
</a>
|
</a>
|
||||||
<span>with status failed</span>
|
<span>with status failed</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<a href="nodes?status=noop">
|
||||||
|
<h1 class="ui header purple no-margin-bottom">
|
||||||
|
{{stats['noop']}}
|
||||||
|
<small>{% if stats['noop']== 1 %} node {% else %} nodes {% endif %}</small>
|
||||||
|
</h1>
|
||||||
|
</a>
|
||||||
|
<span>with status pending</span>
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<a href="nodes?status=changed">
|
<a href="nodes?status=changed">
|
||||||
<h1 class="ui header green no-margin-bottom">
|
<h1 class="ui header green no-margin-bottom">
|
||||||
@@ -30,7 +39,9 @@
|
|||||||
<span>unreported in the last {{ config.UNRESPONSIVE_HOURS }} hours</span>
|
<span>unreported in the last {{ config.UNRESPONSIVE_HOURS }} hours</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="three column row">
|
<div class="four column row">
|
||||||
|
<div class="column">
|
||||||
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h1 class="ui header darkblue no-margin-bottom">{{metrics['num_nodes']}}</h1>
|
<h1 class="ui header darkblue no-margin-bottom">{{metrics['num_nodes']}}</h1>
|
||||||
<span>Population</span>
|
<span>Population</span>
|
||||||
@@ -70,6 +81,8 @@
|
|||||||
green
|
green
|
||||||
{% elif node.status == 'unreported' %}
|
{% elif node.status == 'unreported' %}
|
||||||
black
|
black
|
||||||
|
{% elif node.status == 'noop' %}
|
||||||
|
blue
|
||||||
{% endif %}
|
{% endif %}
|
||||||
" href="{{url_for('report_latest', node_name=node.name)}}">
|
" href="{{url_for('report_latest', node_name=node.name)}}">
|
||||||
{{node.status}}
|
{{node.status}}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
green
|
green
|
||||||
{% elif node.status == 'unreported' %}
|
{% elif node.status == 'unreported' %}
|
||||||
black
|
black
|
||||||
|
{% elif node.status == 'noop' %}
|
||||||
|
blue
|
||||||
{% endif %}
|
{% endif %}
|
||||||
" href="{{url_for('report_latest', node_name=node.name)}}">
|
" href="{{url_for('report_latest', node_name=node.name)}}">
|
||||||
{{node.status}}
|
{{node.status}}
|
||||||
|
|||||||
Reference in New Issue
Block a user