{% 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 %}
        {% if disks_iodata %}
            <table border="1">
                <tr>
                    <td>
                        <b>Disk name/label</b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'bytes_read_sec' %}">Read/s</a></b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'bytes_write_sec' %}">Write/s</a></b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'io_read_sec' %}">Read, IO/s</a></b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'io_write_sec' %}">Write, IO/s</a></b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'bytes_sec' %}">Total data rate/s</a></b>
                    </td>
                    <td>
                        <b><a href="{% url client_detail_view_sorted object.id 'io_sec' %}">Total, IO/s</a></b>
                    </td>
                </tr>
                {% for disk_iodata in disks_iodata %}
                    <tr>
                        <td>
                            {{ disk_iodata.disk_name }}
                        </td>
                        <td>
                            {{ disk_iodata.bytes_read_sec|filesizeformat }}
                        </td>
                        <td>
                            {{ disk_iodata.bytes_write_sec|filesizeformat }}
                        </td>
                        <td>
                            {{ disk_iodata.io_read_sec }}
                        </td>
                        <td>
                            {{ disk_iodata.io_write_sec }}
                        </td>
                        <td>
                            {{ disk_iodata.bytes_sec|filesizeformat }}
                        </td>
                        <td>
                            {{ disk_iodata.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>
        {% else %}
            <p>No data collected for this client yet. Make sure xsanio_client is installed on this Mac.</p>
        {% endif %}

        <p><a href="{% url client_list_view %}">Back to clients</a></p>

{% endblock %}
