Use more standard colors for Puppet run states

This commit is contained in:
Raphaël Pinson
2015-10-05 13:00:54 +02:00
parent de22c61056
commit 8e4af7c034
4 changed files with 66 additions and 13 deletions

View File

@@ -36,6 +36,55 @@ th.tablesorter-headerDesc::after {
display: block; display: block;
} }
.ui.label.status {
color: white;
text-shadow: 0 0 1px;
}
.ui.header.failed, .ui.line.failed {
color: #AA4643;
}
.ui.label.failed {
background-color: #AA4643;
}
.ui.header.changed, .ui.line.changed {
color: #4572A7;
}
.ui.label.changed {
background-color: #4572A7;
}
.ui.header.unreported {
color: #3D96AE;
}
.ui.label.unreported {
background-color: #3D96AE;
}
.ui.header.noop {
color: #DB843D;
}
.ui.label.noop {
background-color: #DB843D;
}
.ui.label.unchanged {
background-color: #89A54E;
}
.ui.line.skipped {
color: orange;
}
.ui.label.skipped {
background-color: orange;
}
.count { .count {
width: 14%; width: 14%;
text-align: center; text-align: center;

View File

@@ -150,13 +150,15 @@
{% macro status_counts(caller, status, node_name, events, current_env, unreported_time=False, report_hash=False) -%} {% macro status_counts(caller, status, node_name, events, current_env, unreported_time=False, report_hash=False) -%}
<a class="ui small status label <a class="ui small status label
{% if status == 'failed' -%} {% if status == 'failed' -%}
red failed
{% elif status == 'changed' -%} {% elif status == 'changed' -%}
green changed
{% elif status == 'unreported' -%} {% elif status == 'unreported' -%}
black unreported
{% elif status == 'noop' -%} {% elif status == 'noop' -%}
blue noop
{% elif status == 'unchanged' -%}
unchanged
{% endif -%} {% endif -%}
" href=" " href="
{% if report_hash -%} {% if report_hash -%}
@@ -170,9 +172,9 @@
{% if status == 'unreported' %} {% if status == 'unreported' %}
<span class="ui small label status"> {{ unreported_time }} </span> <span class="ui small label status"> {{ unreported_time }} </span>
{% else %} {% else %}
{% if events['failures'] %}<span class="ui small count label red">{{events['failures']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%} {% if events['failures'] %}<span class="ui small count label failed">{{events['failures']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%}
{% if events['successes'] %}<span class="ui small count label green">{{events['successes']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%} {% if events['successes'] %}<span class="ui small count label changed">{{events['successes']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%}
{% if events['skips'] %}<span class="ui small count label orange">{{events['skips']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%} {% if events['skips'] %}<span class="ui small count label skipped">{{events['skips']}}</span>{% else %}<span class="ui small count label">0</span>{% endif%}
{% endif %} {% endif %}
{%- endmacro %} {%- endmacro %}
{% macro render_pagination(pagination) -%} {% macro render_pagination(pagination) -%}

View File

@@ -8,7 +8,7 @@
<div class="four column row"> <div class="four column row">
<div class="column"> <div class="column">
<a href="{{url_for('nodes', env=current_env, status='failed')}}"> <a href="{{url_for('nodes', env=current_env, status='failed')}}">
<h1 class="ui red header no-margin-bottom"> <h1 class="ui failed header no-margin-bottom">
{{stats['failed']}} {{stats['failed']}}
<small>{% if stats['failed']== 1 %} node {% else %} nodes {% endif %}</small> <small>{% if stats['failed']== 1 %} node {% else %} nodes {% endif %}</small>
</h1> </h1>
@@ -17,7 +17,7 @@
</div> </div>
<div class="column"> <div class="column">
<a href="{{url_for('nodes', env=current_env, status='noop')}}"> <a href="{{url_for('nodes', env=current_env, status='noop')}}">
<h1 class="ui header purple no-margin-bottom"> <h1 class="ui header noop no-margin-bottom">
{{stats['noop']}} {{stats['noop']}}
<small>{% if stats['noop']== 1 %} node {% else %} nodes {% endif %}</small> <small>{% if stats['noop']== 1 %} node {% else %} nodes {% endif %}</small>
</h1> </h1>
@@ -26,7 +26,7 @@
</div> </div>
<div class="column"> <div class="column">
<a href="{{url_for('nodes', env=current_env, status='changed')}}"> <a href="{{url_for('nodes', env=current_env, status='changed')}}">
<h1 class="ui header green no-margin-bottom"> <h1 class="ui header changed no-margin-bottom">
{{stats['changed']}} {{stats['changed']}}
<small>{% if stats['changed']== 1 %} node {% else %} nodes {% endif %}</small> <small>{% if stats['changed']== 1 %} node {% else %} nodes {% endif %}</small>
</h1> </h1>
@@ -35,7 +35,7 @@
</div> </div>
<div class="column"> <div class="column">
<a href="{{url_for('nodes', env=current_env, status='unreported')}}"> <a href="{{url_for('nodes', env=current_env, status='unreported')}}">
<h1 class="ui header black no-margin-bottom"> <h1 class="ui header unreported no-margin-bottom">
{{ stats['unreported'] }} {{ stats['unreported'] }}
<small>{% if stats['unreported']== 1 %} node {% else %} nodes {% endif %}</small> <small>{% if stats['unreported']== 1 %} node {% else %} nodes {% endif %}</small>
</h1> </h1>

View File

@@ -39,9 +39,11 @@
<tbody> <tbody>
{% for event in events %} {% for event in events %}
{% if not event.failed and event.item['old'] != event.item['new'] %} {% if not event.failed and event.item['old'] != event.item['new'] %}
<tr id='event-{{loop.index}}' class='positive'> <tr id='event-{{loop.index}}' class='ui line changed'>
{% elif event.failed %} {% elif event.failed %}
<tr id='event-{{loop.index}}' class='error'> <tr id='event-{{loop.index}}' class='ui line failed'>
{% else %}
<tr id='event-{{loop.index}}' class='ui line {{event.status}}'>
{% endif %} {% endif %}
<td>{{event.item['type']}}[{{event.item['title']}}]</td> <td>{{event.item['type']}}[{{event.item['title']}}]</td>
<td>{{event.status}}</td> <td>{{event.status}}</td>