Showing the Code ID field in the catalogs page. This is currently unused in PuppetDB as of 3.2.2 but may be useful when it will be used If available, using the latest_report_hash field of the node object in the index and nodes templates for the link to the latest report available for the node. Updating the report_latest function in app.py to query the nodes endpoint and redirecting using the latest_report_hash field if available. If not query the reports endpoint for the node's latest report.
50 lines
2.0 KiB
HTML
50 lines
2.0 KiB
HTML
{% extends 'layout.html' %}
|
|
{% import '_macros.html' as macros %}
|
|
{% block content %}
|
|
<div class="ui fluid icon input hide" style="margin-bottom:20px">
|
|
<input autofocus="autofocus" class="filter-table" placeholder="Type here to filter...">
|
|
</div>
|
|
<table class='ui compact basic table nodes'>
|
|
<thead>
|
|
<tr>
|
|
<th>Status</th>
|
|
<th>Hostname</th>
|
|
<th>Catalog</th>
|
|
<th>Report</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="searchable">
|
|
{% for node in nodes %}
|
|
<tr>
|
|
<td>
|
|
{% if node.latest_report_hash %}
|
|
{{macros.status_counts(status=node.status, node_name=node.name, events=node.events, unreported_time=node.unreported_time, current_env=current_env, report_hash=node.latest_report_hash)}}
|
|
{% else %}
|
|
{{macros.status_counts(status=node.status, node_name=node.name, events=node.events, unreported_time=node.unreported_time, current_env=current_env)}}
|
|
{% endif %}
|
|
</td>
|
|
<td><a href="{{url_for('node', env=current_env, node_name=node.name)}}">{{node.name}}</a></td>
|
|
<td><a rel="utctimestamp" href="{{url_for('catalog_node', env=current_env, node_name=node.name)}}">{{node.catalog_timestamp}}</a></td>
|
|
<td>
|
|
{% if node.report_timestamp %}
|
|
{% if node.latest_report_hash %}
|
|
<a href="{{url_for('report', env=current_env, node_name=node.name, report_id=node.latest_report_hash)}}" rel='utctimestamp'>{{ node.report_timestamp }}</a>
|
|
{% else %}
|
|
<a href="{{url_for('report_latest', env=current_env, node_name=node.name)}}" rel='utctimestamp'>{{ node.report_timestamp }}</a>
|
|
{% endif %}
|
|
{% 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, page=1)}}"><i class='large darkblue book icon'></i></a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock content %}
|