def index(): segments = build_project_segments() context_data = { 'segments': segments, } return _r('explore/explore.html', context_data=context_data)
def show(report_name): report_config = get_report_config(report_name) report_config.slack = False report_config.html = True report_types = get_report_types() report_class = report_types.get(report_config.report_type) report = report_class(report_config) report_content = report.generate_report() context_data = { 'report_name': report_name, 'report_content': report_content, } return _r('reports/view.html', context_data=context_data)
def show_metric(page): filter_params = get_filter_params() filter_form = MetricsFilterForm(**filter_params) stats = getattr(Metrics(), page)(**filter_params) context_data = { 'metrics': stats.metrics, 'stats': stats.stats, 'metrics_json': json.dumps(stats.metrics_json), 'aggregated_stats': stats.aggregated_stats, 'filter_params': filter_params, 'filter_form': filter_form, } return _r('metrics/%s.html' % page, context_data=context_data)
def index(): return _r('index.html')
def index(): return _r('help.html')
def page_not_found(e): return _r('404.html')
def index(page): context_data = { 'metrics': METRICS, } return _r('metrics/%s.html' % page, context_data=context_data)
def index(page): # report_names = get_report_names() context_data = { 'reports': copy.deepcopy(REPORTS), } return _r('reports/%s.html' % page, context_data=context_data)