mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-03-22 00:16:18 +00:00
add alert for disabled Caddy in App Gateway and Gatekeeper modules
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'app_gateway/caddy_disabled_alert.html' %}
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-body">
|
||||
|
||||
@@ -36,12 +37,19 @@
|
||||
</div>
|
||||
{% if active_tab == 'applications' %}
|
||||
<div>
|
||||
{% if caddy_enabled %}
|
||||
<form method="post" action="{% url 'export_caddy_config' %}" class="d-inline">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-outline-secondary">
|
||||
<i class="fas fa-file-export"></i> {% trans 'Export Configuration' %}
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-outline-secondary" disabled
|
||||
title="{% trans 'Export is not available because Caddy is not enabled.' %}">
|
||||
<i class="fas fa-file-export"></i> {% trans 'Export Configuration' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
<a href="{% url 'manage_application' %}" class="btn btn-outline-primary">
|
||||
<i class="fas fa-plus"></i> {% trans 'Add Application' %}
|
||||
</a>
|
||||
|
||||
8
templates/app_gateway/caddy_disabled_alert.html
Normal file
8
templates/app_gateway/caddy_disabled_alert.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% load i18n %}
|
||||
{% if not caddy_enabled %}
|
||||
<div class="alert alert-warning alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h5><i class="icon fas fa-exclamation-triangle"></i> {% trans 'Caddy is not enabled' %}</h5>
|
||||
{% trans 'The App Gateway and Gatekeeper modules require Caddy and the auth-gateway container to be running. Please start the application using <code>docker-compose-caddy.yml</code>.' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user