Esempio n. 1
0
def index():
    segments = build_project_segments()
    context_data = {
        'segments': segments,
    }

    return _r('explore/explore.html', context_data=context_data)
Esempio n. 2
0
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)
Esempio n. 3
0
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)
Esempio n. 4
0
def index():
    return _r('index.html')
Esempio n. 5
0
def index():
    return _r('help.html')
Esempio n. 6
0
def page_not_found(e):
    return _r('404.html')
Esempio n. 7
0
def index(page):
    context_data = {
        'metrics': METRICS,
    }

    return _r('metrics/%s.html' % page, context_data=context_data)
Esempio n. 8
0
def index(page):
    # report_names = get_report_names()
    context_data = {
        'reports': copy.deepcopy(REPORTS),
    }
    return _r('reports/%s.html' % page, context_data=context_data)