Sunil Mohan Adapa 52d55efe35
tor: Show port forwarding information in consistent way
Closes: #2187

Tests:

- Visit the Tor app page after installing. Port forwarding information is
shown like in all other apps. Protocol column lists 'TCP'.

- Information about SOCKS port is shown in the description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-05-23 19:47:15 -04:00

57 lines
1.3 KiB
HTML

{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% block status %}
{% if config_running %}
<h3>{% trans "Status" %}</h3>
<p class="running-status-parent">
<span class="running-status loading"></span>
{% trans "Tor configuration is being updated" %}
</p>
{% else %}
{{ block.super }}
{% if status.hs_enabled %}
<div class="table-responsive">
<table class="table tor-hs">
<thead>
<tr>
<th>{% trans "Onion Service" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Ports" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tor-hs-hostname">{{ status.hs_hostname }}</td>
<td class="tor-hs-status">{{ status.hs_status }}</td>
<td class="tor-hs-services">
{{ status.hs_services|join:', ' }}
</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% endblock %}
{% block internal_zone %}
{% if not config_running %}
{{ block.super }}
{% endif %}
{% endblock %}
{% block page_js %}
<script type="text/javascript" src="{% static 'tor/tor.js' %}"></script>
{% endblock %}