console/app/templates/default/containers/stats.html

70 lines
2.7 KiB
HTML
Raw Normal View History

2015-12-01 02:45:57 +03:00
{% extends "default/_layout.html" %}
{% block title %}Статистика{% endblock %}
{% block content %}
<div class="row">
<div class="large-12 columns">
<h3>Статистика</h3>
</div>
</div>
<div class="row">
{% if g.errors['total'] > 0 %}
<div class="large-12 columns">
{% for error in g.errors['items'] %}
<div class="alert-box alert">
{{ error }}
</div>
{% endfor %}
</div>
{% else %}
<div class="large-12 columns">
Трафик за последие 30 дней:
<table>
<thead>
<tr>
<th>Запросов</th>
<th>Трафик</th>
<th>Цена Гб</th>
</tr>
</thead>
<tr>
<td>{{ stats_string['requests'] }}</td>
<td>{{ stats_string['traffic'] }} Гб</td>
<td>{{ stats_string['cost'] }}</td>
</tr>
</table>
</div>
<div class="large-12 columns">
<h4>Данные по странам</h4>
<table>
<thead>
<tr>
<th colspan="2">Страна</th>
<th>Трафик</th>
</tr>
</thead>
{% if traffic_by_country|length == 0 %}
<tr>
<td colspan="2">Нет данных</td>
</tr>
{% else %}
{% for country in traffic_by_country %}
{% set flag_file="images/country/shiny/32/" + country|upper + ".png" %}
<tr>
<td align="center"><img src="{{ url_for('static', filename=flag_file) }}" /></td>
<td>{{ country|lower }}</td>
<td>{{ traffic_by_country[country] }} Гб</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
{# <div class="large-12 columns">#}
{# <div id="curve_chart_traffic" style="width: 100%; height: 500px"></div>#}
{# <div id="curve_chart_requests" style="width: 100%; height: 500px"></div>#}
{# </div>#}
{% endif %}
</div>
{% endblock %}