{% load static %} {% load redis_metrics_filters %} {% comment %} Context for this Template: * ``chart_id`` -- the id attribute used for the element * ``slugs`` -- a set of slugs for the metrics that we want to aggregate. * ``with_data_table`` -- True or False; whether or not to show raw metric data in a table. * ``metrics`` -- the metric data. It's a list of two-tuples that looks something like this, where the 2nd item is a list of values for the configured Granularties (e.g. [day, week, month, year]) [ ('foo', [42, 90, 50, 991]) ('bar', [42, 10, 5, 90]) ] {% endcomment %}

{% if with_data_table %} {% for t in granularities %}{% endfor %} {% for slug, values in metrics %} {% for v in values %} {% endfor %} {% endfor %}
Metric Data
Metric{{ t }}
{{ slug }}{{ v|default:"-" }}
{% endif %}