<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
{% extends "stats/base.html" %}

{% load humanize %}
{% load table %}

{% block title %}Property | {{property.name}}{% endblock %}

{% block content %}

<table>
<thead>
    <tr>
        {% column_header namespaces 'name' 'Namespace' %}
        {% column_header namespaces 'numTopics' 'Topics' %}
        {% column_header namespaces 'numProducers' 'Producers' %}
        {% column_header namespaces 'numSubscriptions' 'Subscriptions' %}
        {% column_header namespaces 'numConsumers' 'Consumers' %}
        {% column_header namespaces 'rateIn' 'Rate In' %}
        {% column_header namespaces 'rateOut' 'Rate Out' %}
        {% column_header namespaces 'throughputIn' 'Throughput In' %}
        {% column_header namespaces 'throughputOut' 'Throughput Out' %}
        {% column_header namespaces 'backlog' 'Backlog' %}
        {% column_header namespaces 'storage' 'Storage' %}
    </tr>
</thead>
<tbody>

{% for namespace in namespaces.results %}
    <tr class="{% cycle 'row1' 'row2' %}">
        <th>
            <a href="{% url 'namespace' namespace.name %}">{{namespace.name}}</a>
        </th>
        <td>{{namespace.numTopics | intcomma}}</td>
        <td>{{namespace.numProducers | intcomma}}</td>
        <td>{{namespace.numSubscriptions | intcomma}}</td>
        <td>{{namespace.numConsumers | intcomma}}</td>
        <td>{{namespace.rateIn | intcomma}}</td>
        <td>{{namespace.rateOut | intcomma}}</td>
        <td>{{namespace.throughputIn | intcomma}}</td>
        <td>{{namespace.throughputOut | intcomma}}</td>
        <td>{{namespace.backlog | intcomma}}</td>
        <td>{{namespace.storage | filesizeformat}}</td>
    </tr>
{% empty %}
    <tr><td>No namespaces</td></tr>
{% endfor %}
</tbody>
</table>

{% table_footer namespaces %}

{% endblock %}
