Added a hacky solution to allow users to be able to set a number of reports that they wish to display on the reports panel on the node page

This commit is contained in:
stack72
2014-05-16 16:37:16 -05:00
parent bfdc778a81
commit 81c71607ae
5 changed files with 22 additions and 6 deletions

View File

@@ -95,9 +95,13 @@
</script>
{%- endmacro %}
{% macro reports_table(reports, nodename, condensed=False, hash_truncate=False, show_conf_col=True, show_agent_col=True, show_host_col=True) -%}
{% macro reports_table(reports, nodename, reports_count, condensed=False, hash_truncate=False, show_conf_col=True, show_agent_col=True, show_host_col=True) -%}
<div class="ui info message">
Only showing the last ten reports.
Only showing the last {{reports_count}} reports.
</div>
<table class='ui table basic {% if condensed %}compact{% endif %}'>
<thead>

View File

@@ -28,7 +28,7 @@
</div>
<div class='row'>
<h1>Reports</h1>
{{ macros.reports_table(reports, node.name, condensed=True, hash_truncate=True, show_conf_col=False, show_agent_col=False, show_host_col=False)}}
{{ macros.reports_table(reports, node.name, reports_count, condensed=True, hash_truncate=True, show_conf_col=False, show_agent_col=False, show_host_col=False)}}
</div>
</div>
<div class='column'>