mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-01-25 08:46:17 +00:00
67 lines
2.9 KiB
HTML
67 lines
2.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-header">
|
|
<h3 class="card-title">{% trans 'Apply Route Template' %}</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<p>{% trans 'Select a routing template to apply to the peer' %} <strong>{{ current_peer }}</strong>.</p>
|
|
{% if current_template %}
|
|
<div class="alert alert-info">
|
|
{% trans 'Current Active Template:' %} <strong>{{ current_template.name }}</strong>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-hover table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans 'Template Name' %}</th>
|
|
<th>{% trans 'Type' %}</th>
|
|
<th>{% trans 'Actions' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for template in available_templates %}
|
|
<tr {% if template == current_template %}class="table-primary" {% endif %}>
|
|
<td>{{ template.name }}</td>
|
|
<td>{{ template.get_route_type_display }}</td>
|
|
<td>
|
|
{% if template != current_template %}
|
|
<form method="post" style="display:inline;">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="template_uuid" value="{{ template.uuid }}">
|
|
<button type="submit" class="btn btn-primary btn-sm">{% trans 'Apply' %}</button>
|
|
</form>
|
|
{% else %}
|
|
<button class="btn btn-secondary btn-sm" disabled>{% trans 'Active' %}</button>
|
|
<form method="post" style="display:inline;">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="action" value="unlink">
|
|
<button type="submit" class="btn btn-warning btn-sm">{% trans 'Unlink' %}</button>
|
|
</form>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="3" class="text-center">{% trans 'No routing templates available for this interface.' %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer">
|
|
<a href="/peer/manage/?peer={{ current_peer.uuid }}" class="btn btn-default">{% trans 'Back' %}</a>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |