<!--

    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 %}Broker | {{property.name}}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="{% url 'home' %}">Home</a>
    &rsaquo; <a href="{% url 'brokers' %}">Brokers</a>
    &rsaquo; {{broker_url}}
</div>
{% endblock %}


{% block content %}

<table>
<thead>
    <tr>
        {% column_header topics 'namespace__name' 'Namespace' %}
        {% column_header topics 'name' 'Topic' %}
        {% column_header topics 'msgRateIn' 'Msg/s in' %}
        {% column_header topics 'msgRateOut' 'Msg/s out' %}
        {% column_header topics 'msgThroughputIn' 'Bytes/s in' %}
        {% column_header topics 'msgThroughputOut' 'Bytes/s out' %}
        {% column_header topics 'backlog' 'Backlog' %}
    </tr>
</thead>
<tbody>

{% for topic in topics.results %}
    <tr class="{% cycle 'row1' 'row2' %}">
        <th><a href="{% url 'namespace' topic.namespace.name %}">{{topic.namespace}}</a></th>
        <th><a href="{{topic.get_absolute_url}}">{{topic.short_name}}</a></th>
        <td>{{topic.msgRateIn | intcomma}}</td>
        <td>{{topic.msgRateOut | intcomma}}</td>
        <td>{{topic.msgThroughputIn | intcomma}}</td>
        <td>{{topic.msgThroughputOut | intcomma}}</td>
        <td>{{topic.backlog | intcomma}}</td>
    </tr>
{% empty %}
    <tr><td>No topics</td></tr>
{% endfor %}
</tbody>
</table>

{% table_footer topics %}


{% endblock %}
