mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
letsencrypt: Improve display when no domains are configured
Show better message, and hide diagnostics button.
This commit is contained in:
parent
d220fa946a
commit
14b65ae456
@ -14,6 +14,8 @@ All notable changes to this project will be documented in this file.
|
|||||||
- dynamicdns: Allow reading status as non-root.
|
- dynamicdns: Allow reading status as non-root.
|
||||||
- config: Set current domainname again after hostname change.
|
- config: Set current domainname again after hostname change.
|
||||||
- config: Handle clearing of domain name.
|
- config: Handle clearing of domain name.
|
||||||
|
- letsencrypt: When no domains are configured, show better message,
|
||||||
|
and hide diagnostics button.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- repro: Use firewalld provided SIP services.
|
- repro: Use firewalld provided SIP services.
|
||||||
|
|||||||
@ -34,72 +34,74 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block configuration %}
|
{% block configuration %}
|
||||||
|
{% if status.domains %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<table class="table table-bordered table-condensed table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans "Domain" %}</th>
|
||||||
|
<th>{% trans "Certificate Status" %}</th>
|
||||||
|
<th>{% trans "Website Security" %}</th>
|
||||||
|
<th>{% trans "Actions" %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for domain, domain_status in status.domains.items %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ domain }}</td>
|
||||||
|
<td>
|
||||||
|
{% if domain_status.certificate_available %}
|
||||||
|
<span class="label label-success">
|
||||||
|
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
|
||||||
|
Expires on {{ expiry_date }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="label label-warning">
|
||||||
|
{% trans "No certificate" %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if domain_status.web_enabled %}
|
||||||
|
<span class="label label-success">{% trans "Enabled" %}</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="label label-warning">{% trans "Disabled" %}</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if domain_status.certificate_available %}
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:revoke' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-default" type="submit">
|
||||||
|
{% trans "Revoke" %}</button>
|
||||||
|
</form>
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:obtain' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-default" type="submit">
|
||||||
|
{% trans "Re-obtain" %}</button>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form class="form form-inline" method="post"
|
||||||
|
action="{% url 'letsencrypt:obtain' domain %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<button class="btn btn-sm btn-primary" type="submit">
|
||||||
|
{% trans "Obtain" %}</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
{% include "diagnostics_button.html" with module="letsencrypt" %}
|
||||||
<div class="col-lg-12">
|
{% else %}
|
||||||
<table class="table table-bordered table-condensed table-striped">
|
No domains have been configured....
|
||||||
<thead>
|
{% endif %}
|
||||||
<tr>
|
|
||||||
<th>{% trans "Domain" %}</th>
|
|
||||||
<th>{% trans "Certificate Status" %}</th>
|
|
||||||
<th>{% trans "Website Security" %}</th>
|
|
||||||
<th>{% trans "Actions" %}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for domain, domain_status in status.domains.items %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ domain }}</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.certificate_available %}
|
|
||||||
<span class="label label-success">
|
|
||||||
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
|
|
||||||
Expires on {{ expiry_date }}
|
|
||||||
{% endblocktrans %}
|
|
||||||
</span>
|
|
||||||
{% else %}
|
|
||||||
<span class="label label-warning">
|
|
||||||
{% trans "No certificate" %}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.web_enabled %}
|
|
||||||
<span class="label label-success">{% trans "Enabled" %}</span>
|
|
||||||
{% else %}
|
|
||||||
<span class="label label-warning">{% trans "Disabled" %}</span>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if domain_status.certificate_available %}
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:revoke' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-default" type="submit">
|
|
||||||
{% trans "Revoke" %}</button>
|
|
||||||
</form>
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:obtain' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-default" type="submit">
|
|
||||||
{% trans "Re-obtain" %}</button>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<form class="form form-inline" method="post"
|
|
||||||
action="{% url 'letsencrypt:obtain' domain %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button class="btn btn-sm btn-primary" type="submit">
|
|
||||||
{% trans "Obtain" %}</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include "diagnostics_button.html" with module="letsencrypt" %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user