Beispiel #1
0
def reports_node(node_name):
    """Fetches all reports for a node and processes them eventually rendering
    a table displaying those reports."""
    reports = limit_reports(
        yield_or_stop(puppetdb.reports(query='["=", "certname", "{0}"]'.format(node_name))), app.config["REPORTS_COUNT"]
    )
    return render_template(
        "reports_node.html", reports=reports, nodename=node_name, reports_count=app.config["REPORTS_COUNT"]
    )
Beispiel #2
0
def reports_node(node):
    """Fetches all reports for a node and processes them eventually rendering
    a table displaying those reports."""
    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,
        reports_count=app.config['REPORTS_COUNT'])
Beispiel #3
0
def node(node_name):
    """Display a dashboard for a node showing as much data as we have on that
    node. This includes facts and reports but not Resources as that is too
    heavy to do within a single request.
    """
    node = get_or_abort(puppetdb.node, node_name)
    facts = node.facts()
    reports = limit_reports(node.reports(), app.config['REPORTS_COUNT'])
    return render_template('node.html',
                           node=node,
                           facts=yield_or_stop(facts),
                           reports=yield_or_stop(reports),
                           reports_count=app.config['REPORTS_COUNT'])
Beispiel #4
0
def node(node_name):
    """Display a dashboard for a node showing as much data as we have on that
    node. This includes facts and reports but not Resources as that is too
    heavy to do within a single request.
    """
    node = get_or_abort(puppetdb.node, node_name)
    facts = node.facts()
    reports = limit_reports(node.reports(), app.config['REPORTS_COUNT'])
    return render_template(
        'node.html',
        node=node,
        facts=yield_or_stop(facts),
        reports=yield_or_stop(reports),
        reports_count=app.config['REPORTS_COUNT'])