@app.route('/report/<node_name>/<report_id>', defaults={'env': app.config['DEFAULT_ENVIRONMENT']})
@app.route('/<env>/report/<node_name>/<report_id>')
def report(env, node_name, report_id):
    envs = environments()
    check_env(env, envs)

    if env == '*':
        query = '["and", ["=", "certname", "{0}"],' \
            '["or", ["=", "hash", "{1}"], ["=", "configuration_version", "{1}"]]]'.format(
                node_name, report_id)
    else:
        query = '["and", ["=", "environment", "{0}"], ["=", "certname", "{1}"],' \
            '["or", ["=", "hash", "{2}"], ["=", "configuration_version", "{2}"]]]'.format(
                env, node_name, report_id)
    reports = puppetdb.reports(query=query)

    try:
        report = next(reports)
    except StopIteration:
        abort(404)

    return render_template(
        'report.html',
        report=report,
        events=yield_or_stop(report.events()),
        logs=report.logs,
        metrics=report.metrics,
        envs=envs,
        current_env=env)
Displays a single report including all the events associated with that
dataset/ETHPy150Open voxpupuli/puppetboard/puppetboard/app.py/report