def get_object_counts(): status = {} status['queries_count'] = Query.query.count() if settings.FEATURE_SHOW_QUERY_RESULTS_COUNT: status['query_results_count'] = QueryResult.query.count() status['unused_query_results_count'] = QueryResult.unused().count() status['dashboards_count'] = Dashboard.query.count() status['widgets_count'] = Widget.query.count() return status
def get_object_counts(): status = {} status["queries_count"] = Query.query.count() if settings.FEATURE_SHOW_QUERY_RESULTS_COUNT: status["query_results_count"] = QueryResult.query.count() status["unused_query_results_count"] = QueryResult.unused().count() status["dashboards_count"] = Dashboard.query.count() status["widgets_count"] = Widget.query.count() return status
def get_object_counts(): status = {} status['指标数'] = Query.query.count() if settings.FEATURE_SHOW_QUERY_RESULTS_COUNT: status['指标结果集数'] = QueryResult.query.count() status['未使用指标结果集数'] = QueryResult.unused().count() status['看板数'] = Dashboard.query.count() status['小部件数'] = Widget.query.count() return status