mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Tests: - Ensure that systemd-resolved package is not installed. - Resolver status table is now shown. - Instead a message is shown with button to re-run setup. Clicking the button re-runs setup of the names app. - Configuration form is also now shown. - If systemd-resolved package is installed during re-run of setup, then status table is shown. - Message to install systemd-resolved is not shown. - Configuration form is shown. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
137 lines
4.0 KiB
HTML
137 lines
4.0 KiB
HTML
{% extends "app.html" %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
|
|
{% block status %}
|
|
{{ block.super }}
|
|
|
|
<h3>{% trans "Domains" %}</h3>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table names-table">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Type" %}</th>
|
|
<th class="names-domain-column">{% trans "Domain Name" %}</th>
|
|
<th>{% trans "Services" %}</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for domain in status.domains|dictsort:"domain_type.display_name" %}
|
|
<tr>
|
|
<td>{{ domain.domain_type.display_name }}</td>
|
|
<td class="names-domain-column">{{ domain.name }}</td>
|
|
<td>{{ domain.get_readable_services|join:', ' }}</td>
|
|
<td>
|
|
<a href="{% url domain.domain_type.configuration_url %}"
|
|
role="button" class="btn btn-md btn-default">
|
|
{% trans "Configure" %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
{% for domain_type in status.unused_domain_types %}
|
|
<tr>
|
|
<td>{{ domain_type.display_name }}</td>
|
|
<td>-</td>
|
|
<td>-</td>
|
|
<td>
|
|
<a href="{% url domain_type.configuration_url %}"
|
|
role="button" class="btn btn-md btn-default">
|
|
{% trans "Configure" %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<h3>{% trans "Resolver Status" %}</h3>
|
|
|
|
{% if resolved_installed and resolved_status %}
|
|
<div class="table-responsive">
|
|
<table class="table resolved-status-table">
|
|
<tbody>
|
|
{% for link in resolved_status %}
|
|
<tr>
|
|
<th colspan="2">
|
|
{% if link.link_index == 0 %}
|
|
{% trans "Global" %}
|
|
{% else %}
|
|
{% trans "Link" %} {{ link.link_index }} ({{link.interface_name}})
|
|
{% endif %}
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans "DNS-over-TLS" %}</td>
|
|
<td>{{ link.dns_over_tls_string }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{% trans "DNSSEC" %}</td>
|
|
<td>{{ link.dnssec_string }}/{{ link.dnssec_supported_string }}</td>
|
|
</tr>
|
|
{% if link.current_dns_server %}
|
|
<tr>
|
|
<td>{% trans "Current DNS Server" %}</td>
|
|
<td>{{ link.current_dns_server }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if link.dns_servers %}
|
|
<tr>
|
|
<td>{% trans "DNS Servers" %}</td>
|
|
<td>
|
|
{% for server in link.dns_servers %}
|
|
{{ server }}<br />
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if link.fallback_dns_servers %}
|
|
<tr>
|
|
<td>{% trans "Fallback DNS Servers" %}</td>
|
|
<td>
|
|
{% for server in link.fallback_dns_servers %}
|
|
{{ server }}<br />
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% elif not resolved_installed %}
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
systemd-resolved package is not installed. Install it for additional
|
|
functionality.
|
|
{% endblocktrans %}
|
|
<form class="form form-install-resolved" method="post"
|
|
action="{% url 'rerun-setup' app_id='names' %}">
|
|
{% csrf_token %}
|
|
|
|
<input type="submit" class="btn btn-primary" name="install_resolved"
|
|
value="{% trans 'Install' %}"/>
|
|
</form>
|
|
</p>
|
|
{% else %}
|
|
<div class="alert alert-danger">
|
|
{% trans "Error retrieving status:" %} {{ resolved_status_error }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
{% block configuration %}
|
|
{% if resolved_installed %}
|
|
{{ block.super }}
|
|
{% endif %}
|
|
{% endblock %}
|