Files
puppetboard/puppetboard/templates/index.html
Corey Hammerton af05f67428 puppetboard: Adding PuppetDB 3.x support
Some excerpts from CHANGELOG.rst include:
- Increasing the pypuppetdb requirements from 0.1.x to 0.2.x
- The Reports page now lists reports from the reports endpoint instead of
  a link to a PuppetDB issue with a feature request
- Adding a Catalogs page to view either individual node catalogs or compare
  them against other nodes
- New environment awareness adds a new query parameter to all applicable
  endpoints to filter results based on the current environment. If the
  default environment 'production' is not available, or any other unavailable
  environment, the user is redirected to the first known environment.
- Adding pagination functionality for reports (for now) based on the value of
  the REPORTS_COUNT configuration option (used for the limit and the offset
  calculation). Implementation also makes it possible for other UI enhancements.
- Removing the limit_reports function from puppetboard/utils.py since paging
  parameters are now accepted by the pypuppetdb endpoint functions.
- Bumping the version to 0.1.0
2015-10-26 21:44:33 -04:00

112 lines
3.9 KiB
HTML

{% extends 'layout.html' %}
{% import '_macros.html' as macros %}
{% block content %}
<div class="ui vertical grid">
<div class="four column row">
<div class="column">
<a href="{{url_for('nodes', env=current_env, status='failed')}}">
<h1 class="ui red header no-margin-bottom">
{{stats['failed']}}
<small>{% if stats['failed']== 1 %} node {% else %} nodes {% endif %}</small>
</h1>
</a>
<span>with status failed</span>
</div>
<div class="column">
<a href="{{url_for('nodes', env=current_env, 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">
<a href="{{url_for('nodes', env=current_env, status='changed')}}">
<h1 class="ui header green no-margin-bottom">
{{stats['changed']}}
<small>{% if stats['changed']== 1 %} node {% else %} nodes {% endif %}</small>
</h1>
</a>
<span>with status changed</span>
</div>
<div class="column">
<a href="{{url_for('nodes', env=current_env, status='unreported')}}">
<h1 class="ui header black no-margin-bottom">
{{ stats['unreported'] }}
<small>{% if stats['unreported']== 1 %} node {% else %} nodes {% endif %}</small>
</h1>
</a>
<span>unreported in the last {{ config.UNRESPONSIVE_HOURS }} hours</span>
</div>
</div>
<div class="four column row">
<div class="column">
<span>Global Metrics:</span>
</div>
<div class="column">
<h1 class="ui header darkblue no-margin-bottom">{{metrics['num_nodes']}}</h1>
<span>Population</span>
</div>
<div class="column">
<h1 class="ui header darkblue no-margin-bottom">{{metrics['num_resources']}}</h1>
<span>Resources managed</span>
</div>
<div class="column">
<h1 class="ui header darkblue no-margin-bottom">{{metrics['avg_resources_node']}}</h1>
<span>Avg. resources/node</span>
</div>
</div>
<div class="ui divider">
</div>
<div class="one column row no-margin-top">
<div class="column">
{% if nodes %}
<h2>Nodes status detail ({{nodes|length}})</h2>
<table class='ui compact basic table dashboard'>
<thead>
<tr>
<th class="five wide">Status</th>
<th class="five wide">Hostname</th>
<th class="five wide">Report</th>
<th class="one wide"></th>
</tr>
</thead>
<tbody class="searchable">
{% for node in nodes %}
{% if node.status != 'unchanged' %}
<tr>
<td>
{{macros.status_counts(status=node.status, node_name=node.name, events=node.events, unreported_time=node.unreported_time, current_env=current_env)}}
</td>
<td>
<a href="{{url_for('node', env=current_env, node_name=node.name)}}">{{ node.name }}</a>
</td>
<td>
{% if node.report_timestamp %}
<a href="{{url_for('report_latest', env=current_env, node_name=node.name)}}" rel='utctimestamp'>{{ node.report_timestamp }}</a>
{% else %}
<i class="large ban circle icon"></i>
{% endif %}
</td>
<td>
{% if node.report_timestamp %}
<a title='Reports' href="{{url_for('reports_node', env=current_env, node_name=node.name)}}"><i class='large darkblue book icon'></i></a>
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% else %}
<h2>Nodes status detail</h2>
<div class="ui info message">
Nothing seems to be changing.
</div>
{% endif %}
</div>
</div>
</div>
{% endblock content %}