{% extends "redis_metrics/base.html" %}

{% load redis_metric_tags %}

{% block titletext %}Aggregate History{% endblock %}
{% block breadcrumb %}
    <li><a href="{% url 'redis_metric_aggregate' %}">Select Metrics</a></li>
    <li><a href="{% url 'redis_metric_aggregate_detail' slugs|join:"+" %}">Detail</a></li>
    <li class="active">{{ granularity }} history</li>
{% endblock %}

{% block content %}
    <ul class="nav nav-pills history">
    {% for g in granularities %}
    <li><a href="{% url 'redis_metric_aggregate_history' slugs|join:"+" g %}">{{ g|title }}</a></li>
    {% endfor %}
    </ul>

    {# Menu for viewing metrics at different levels #}
    {% metrics_since slugs 5 "aggregate_history" granularity %}

    {# Show the chart #}
    {% aggregate_history slugs granularity since True %}

{% endblock %}
