add alert for disabled Caddy in App Gateway and Gatekeeper modules

This commit is contained in:
Eduardo Silva
2026-03-17 15:43:21 -03:00
parent b517f70165
commit 8435d5edcb
5 changed files with 32 additions and 10 deletions

View File

@@ -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>

View 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">&times;</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 %}