Add templates/history.html
This commit is contained in:
parent
5e75686dea
commit
d1494dbfcb
1 changed files with 79 additions and 0 deletions
79
templates/history.html
Normal file
79
templates/history.html
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}AS215085 - Router tools | History{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section id="total-routes-graph">
|
||||
<h2>Total Route History</h2>
|
||||
<div class="d-flex justify-content-end align-items-center mb-3">
|
||||
<div class="btn-group" role="group" aria-label="Time range">
|
||||
<button type="button" class="btn btn-outline-primary active" data-range="24h">24H</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-range="7d">7D</button>
|
||||
<button type="button" class="btn btn-outline-primary" data-range="30d">30D</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="achart-wrapper-chart">
|
||||
<canvas id="totalRoutesChart"></canvas>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<section id="peer-links">
|
||||
<h2>Peer History Links</h2>
|
||||
{% if peers %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h5>IPv4 Peers</h5>
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for peer in peers if peer.ip_version == 'ipv4' %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<a href="{{ url_for('bgp_peer_graph_page', ip_version='ipv4', neighbor_ip=peer.neighbor_address) }}" target="_blank" rel="noopener noreferrer">
|
||||
{{ peer.neighbor_address }}
|
||||
</a>
|
||||
{% if peer.description %}
|
||||
<small class="ms-2 text-muted">{{ peer.description }}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if peer.asn %}
|
||||
<a href="https://bgp.tools/search?q={{ peer.asn }}" target="_blank" rel="noopener noreferrer">
|
||||
AS{{ peer.asn }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>IPv6 Peers</h5>
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for peer in peers if peer.ip_version == 'ipv6' %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<a href="{{ url_for('bgp_peer_graph_page', ip_version='ipv6', neighbor_ip=peer.neighbor_address) }}" target="_blank" rel="noopener noreferrer">
|
||||
{{ peer.neighbor_address }}
|
||||
</a>
|
||||
{% if peer.description %}
|
||||
<small class="ms-2 text-muted">{{ peer.description }}</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if peer.asn %}
|
||||
<a href="https://bgp.tools/search?q={{ peer.asn }}" target="_blank" rel="noopener noreferrer">
|
||||
AS{{ peer.asn }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-center">No historical data found for peers yet. Run the collector to collect data.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/chart.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/chartjs-adapter-date-fns') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/pages/history.js') }}"></script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue