{% extends "base.html" %}

{% block title %}AS215085 - Router tools | Port{% endblock %}

{% block page_header %}<H3>Port stats</H3>{% endblock %}

{% block content %}
	<section id="overview">
        <center>
            {% if error %}
                <div class="graph-container">
                    <h2 style="color: red;"><strong>Error:</strong> Interface <strong>{{ interface_name }}</strong> not found.</h2>
                </div>
            {% else %}
            <p><b>Stats for port: {{ interface_name }}</b></p>
                <div class="graph-container">
                    <p>24H</p>
                    <img src="data:image/svg+xml;base64,{{ daily }}" alt="Day">
                    <p>Week</p>
                    <img src="data:image/svg+xml;base64,{{ weekly }}" alt="Week">
                    <p>Month</p>
                    <img src="data:image/svg+xml;base64,{{ monthly }}" alt="Month">
                </div>
            {% endif %}
        </center>
	</section>
{% endblock %}