{% extends 'syspanel/base.html' %}
{% load i18n sizeformat %}
{% block title %}Usage Overview{% endblock %}

{% block page_header %}
  {# to make searchable false, just remove it from the include statement #}
  {% include "horizon/common/_page_header.html" with title=_("System Panel Overview") %}
{% endblock page_header %}

{% block syspanel_main %}
{% if external_links %}
  <div id="monitoring">
    <h3>{% trans "Monitoring" %}: </h3>
    <ul id="external_links">
      {% for link in external_links %}
        <li><a target="_blank" href="{{ link.1 }}">{{ link.0}}</a></li>
      {% endfor %}
    </ul>
  </div>
{% endif %}

<form action="" method="get" id="date_form">
  <h3>{% trans "Select a month to query its usage" %}: </h3>
  <div class="form-row">
    {{ dateform.month }}
    {{ dateform.year }}
    <input class="btn small" type="submit"/>
  </div>
</form>

<p id="activity">
  <span><strong>{% trans "Active Instances" %}:</strong> {{ global_summary.total_active_instances|default:'-' }}</span>
  <span><strong>{% trans "Active Memory" %}:</strong> {{ global_summary.total_active_memory_mb|mbformat|default:'-' }}</span>
  <span><strong>{% trans "This month's VCPU-Hours" %}:</strong> {{ global_summary.total_vcpus_usage|floatformat|default:'-' }}</span>
  <span><strong>{% trans "This month's GB-Hours" %}:</strong> {{ global_summary.total_local_gb_usage|floatformat|default:'-' }}</span>
</p>

{% block activity_list %}{% endblock %}

{% endblock %}
