Esempio n. 1
0
def export_dashboards(session):
    """Returns all dashboards metadata as a json dump"""
    logging.info('Starting export')
    dashboards = session.query(Dashboard)
    dashboard_ids = []
    for dashboard in dashboards:
        dashboard_ids.append(dashboard.id)
    data = Dashboard.export_dashboards(dashboard_ids)
    return data
def export_dashboards(session):
    """Returns all dashboards metadata as a json dump"""
    logging.info('Starting export')
    dashboards = session.query(Dashboard)
    dashboard_ids = []
    for dashboard in dashboards:
        dashboard_ids.append(dashboard.id)
    data = Dashboard.export_dashboards(dashboard_ids)
    return data
Esempio n. 3
0
def export_dashboards(session, id_=None):
    """Returns all dashboards metadata as a json dump"""
    logging.info("Starting export")
    dashboard_ids = []
    if id is None:
        dashboards = session.query(Dashboard)
        for dashboard in dashboards:
            dashboard_ids.append(dashboard.id)
    else:
        dashboard_ids = [id_]
    data = Dashboard.export_dashboards(dashboard_ids)
    return data