{% extends "base.html" %}

{% block html_title %}{{ object.name }} I/O statistics{% endblock %}

{% block page_title %}{{ object.name }} I/O statistics{% endblock %}

{% block meta %} <meta http-equiv="refresh" content="2"> {% endblock %}

{% block content %}
        <table border="1">
            <tr>
                <td>
                    <b>Client</b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'bytes_read_sec' %}">Read/s</a></b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'bytes_write_sec' %}">Write/s</a></b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'io_read_sec' %}">Read, IO/s</a></b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'io_write_sec' %}">Write, IO/s</a></b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'bytes_sec' %}">Total data rate/s</a></b>
                </td>
                <td>
                    <b><a href="{% url volume_detail_view_sorted object.id 'io_sec' %}">Total, IO/s</a></b>
                </td>
            </tr>
            {% for client_obj in clients_data %}
                <tr>
                    <td>
                        <a href="{% url client_detail_view client_obj.client_id %}">{{ client_obj.client_hostname }}</a>
                    </td>
                    <td>
                        {{ client_obj.bytes_read_sec|filesizeformat }}
                    </td>
                    <td>
                        {{ client_obj.bytes_write_sec|filesizeformat }}
                    </td>
                    <td>
                        {{ client_obj.io_read_sec }}
                    </td>
                    <td>
                        {{ client_obj.io_write_sec }}
                    </td>
                    <td>
                        {{ client_obj.bytes_sec|filesizeformat }}
                    </td>
                    <td>
                        {{ client_obj.io_sec }}
                    </td>
                </tr>
            {% endfor %}
            <tr>
                <td>
                    <i>Total </i>
                </td>
                <td>
                    <i>{{ global_stats.bytes_read_sec|filesizeformat }}</i>
                </td>
                <td>
                    <i>{{ global_stats.bytes_write_sec|filesizeformat }}</i>
                </td>
                <td>
                    <i>{{ global_stats.io_read_sec}}</i>
                </td>
                <td>
                    <i>{{ global_stats.io_write_sec}}</i>
                </td>
                <td>
                    <i>{{ global_stats.bytes_sec|filesizeformat }}</i>
                </td>
                <td>
                    <i>{{ global_stats.io_sec}}</i>
                </td>
            </tr>
        </table>

        <p><a href="{% url volume_list_view %}">Back to volumes</a></p>

{% endblock %}
