#{extends 'RabbitMQStats/layout.html' /}
#{set title:'RabbitMQ' /}

<h1>Live Stats: ${queueName}</h1>

<section>

<h2>Producer</h2>
<p id="producerSuccess">
    <span>Successful: <strong>${producerSuccess}</strong></span>
</p>

<p id="producerFailed">
    <span>Failures: <strong>${producerFailed}</strong></span>
</p>        

<h2>Consumer</h2>
<p id="consumerSuccess">
    <span>Successful: <strong>${consumerSuccess}</strong></span>
</p>

<p id="consumerFailed">
    <span>Failures: <strong>${consumerFailed}</strong></span>
</p>  

</section>

<script type="text/javascript" charset="utf-8">
    setInterval(function() {
        $('section').load('@{queueStatsDetails(queueName)}')
    }, 1000)
</script>                 

<br><br>
<a href="@{RabbitMQStats.index()}">Return Main Page</a>