Router-tools/templates/irr_tools.html

49 lines
No EOL
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}AS215085 - Router tools | IRR Updater{% endblock %}
{% block page_header %}<H3>IRR Filter Management</H3>{% endblock %}
{% block content %}
<section id="irr-editor">
<h2>asns.txt Editor</h2>
<p>Edit the list of ASNs and AS Sets here (format: <code>ASN</code> or <code>ASN:AS-SET</code>). This file is on the IRR machine.</p>
{% if error %}
<div class="alert alert-danger" role="alert">
<strong>Error loading data:</strong> {{ error }}
<br><small>Check that the IRR API service is running and that the .env variables (IRR_API_URL, IRR_API_KEY) are correct.</small>
</div>
{% endif %}
<div class="mb-3">
<textarea id="asnsContent" class="form-control" rows="15" style="font-family: monospace;">{{ asns_content }}</textarea>
</div>
<button id="saveBtn" class="btn btn-primary">
<i class="fas fa-save"></i> Save
</button>
</section>
<hr class="my-4">
<section id="irr-control">
<h2>Perform Update</h2>
<p>Start the <code>gen.sh</code> script on the IRR machine. This clears the old log, fetches new prefixes, removes orphaned lists, and pushes the update to the VyOS router.</p>
<button id="runBtn" class="btn btn-success">
<i class="fas fa-cogs"></i> Start IRR Update
</button>
<button id="logBtn" class="btn btn-info ms-2">
<i class="fas fa-clipboard-list"></i> View Log of Last Run
</button>
</section>
<hr class="my-4">
<section id="irr-log">
<h2>Log Output</h2>
<div id="statusMessage" class="alert alert-secondary" role="alert" style="display: none;"></div>
<pre id="logOutput" class="bg-dark text-light p-3 rounded" style="min-height: 100px; max-height: 600px; overflow-y: auto; white-space: pre-wrap;">Click on Start IRR Update or View Log to see the output here.</pre>
</section>
<script src="{{ url_for('static', filename='js/pages/irr_tools.js') }}"></script>
{% endblock %}