Exemplo n.º 1
0
def filtered(filters):
    aggregated = []
    for dc in dcs:
        if check_connection(dc):
            aggregated.append(
                agg_data(dc, get_data(dc, timeout), get_stashes(dc, timeout),
                         get_clients(dc, timeout), filters))

    return render_template('data.html',
                           dcs=dcs,
                           data=aggregated,
                           filter_data=get_filter_data(dcs, timeout),
                           appcfg=appcfg)
Exemplo n.º 2
0
def showgrid(d, filters=None):
    data_detail = {}
    if dcs:
        for dc in dcs:
            if dc['name'] == d:
                if check_connection(dc):
                    if filters:
                        clients = get_clients(dc, timeout)
                    else:
                        clients = None

                    data_detail = agg_host_data(get_data(dc, timeout),
                                                get_stashes(dc, timeout),
                                                clients, filters)
                    if data_detail:
                        break
    else:
        abort(404)
    return render_template('detail.html',
                           dc=dc,
                           data=data_detail,
                           filter_data=get_filter_data(dcs, timeout),
                           appcfg=appcfg)