{% extends "layout.html" %}

{% block content %}

<ol class="breadcrumb">
    <li><a href="{{ url_for('account_view') }}">Account</a></li>
    <li><a href="{{ url_for('subscription_view', subscription_id=subscription_id) }}">{{subscription_id}}</a></li>
    <li><a href="{{ url_for('resourcegroup_view', subscription_id=subscription_id, resource_group_name=resource_group_name) }}">{{resource_group_name}}</a></li>
    <li><a href="{{ url_for('storageaccount_view', subscription_id=subscription_id, resource_group_name=resource_group_name, account_name=account_name) }}">{{account_name}}</a></li>
    <li class="active">{{model.queue_name}}</li>
</ol>

<h3>Queue Metadata</h3>
<table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Name</th>
            <th>Value</th>
        </tr>
    </thead>
    <tbody>
        {% for name, val in model.metadata.items() %}
        <tr>
            <td>{{name}}</td>
            <td>{{val}}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>

<h3>Messages</h3>
<table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Message Id</th>
            <th>Insertion Time</th>
            <th>Expiration Time</th>
            <th>Message Text</th>
            <th>Message Text (Raw)</th>
        </tr>
    </thead>
    <tbody>
        {% for msg in model.messages %}
        <tr>
            <td>{{msg.message_id}}</td>
            <td>{{msg.insertion_time}}</td>
            <td>{{msg.expiration_time}}</td>
            <td>{{msg.decoded_text}}</td>
            <td>{{msg.message_text}}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>

{% endblock %}
