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

    if app.config['ENABLE_CATALOG']:
        nodenames = []
        catalog_list = []
        if env == '*':
            query = '["null?", "catalog_timestamp", false]]'
        else:
            query = '["and",' \
                '["=", "catalog_environment", "{0}"],' \
                '["null?", "catalog_timestamp", false]]'.format(env),
        nodes = get_or_abort(puppetdb.nodes,
            query=query,
            with_status=False,
            order_by='[{"field": "certname", "order": "asc"}]')
        nodes, temp = tee(nodes)

        for node in temp:
            nodenames.append(node.name)

        for node in nodes:
            table_row = {
                'name': node.name,
                'catalog_timestamp': node.catalog_timestamp
            }

            if len(nodenames) > 1:
                form = CatalogForm()

                form.compare.data = node.name
                form.against.choices = [(x, x) for x in nodenames
                                        if x != node.name]
                table_row['form'] = form
            else:
                table_row['form'] = None

            catalog_list.append(table_row)

        return render_template(
            'catalogs.html',
            nodes=catalog_list,
            envs=envs,
            current_env=env)
    else:
        log.warn('Access to catalog interface disabled by administrator')
        abort(403)
Only load if boto is available.
dataset/ETHPy150Open voxpupuli/puppetboard/puppetboard/app.py/catalogs--crossover with--dataset/ETHPy150Open saltstack/salt/salt/states/boto_rds.py/__virtual__