Removing the ten_reports method and passed the reports count through to the reports_node page
This commit is contained in:
@@ -21,7 +21,7 @@ from pypuppetdb import connect
|
||||
from puppetboard.forms import QueryForm
|
||||
from puppetboard.utils import (
|
||||
get_or_abort, yield_or_stop,
|
||||
ten_reports, limit_reports, jsonprint
|
||||
limit_reports, jsonprint
|
||||
)
|
||||
|
||||
|
||||
@@ -193,12 +193,13 @@ def reports():
|
||||
def reports_node(node):
|
||||
"""Fetches all reports for a node and processes them eventually rendering
|
||||
a table displaying those reports."""
|
||||
reports = ten_reports(yield_or_stop(
|
||||
puppetdb.reports('["=", "certname", "{0}"]'.format(node))))
|
||||
reports = limit_reports(yield_or_stop(
|
||||
puppetdb.reports('["=", "certname", "{0}"]'.format(node))), app.config['REPORTS_COUNT'])
|
||||
return render_template(
|
||||
'reports_node.html',
|
||||
reports=reports,
|
||||
nodename=node)
|
||||
nodename=node,
|
||||
reports_count=app.config['REPORTS_COUNT'])
|
||||
|
||||
|
||||
@app.route('/report/latest/<node_name>')
|
||||
|
||||
Reference in New Issue
Block a user