add display_name field to models and update related forms and templates

This commit is contained in:
Eduardo Silva
2026-03-16 16:33:12 -03:00
parent c912e7bb5f
commit 51a2535e87
9 changed files with 136 additions and 46 deletions

View File

@@ -75,7 +75,7 @@
<td>{{ app.routes.count }}</td>
<td>
{% if app.default_policy_config %}
{{ app.default_policy_config.default_policy.name }}
{{ app.default_policy_config.default_policy }}
{% else %}
{% trans 'Default (Deny)' %}
{% endif %}
@@ -145,7 +145,7 @@
<tbody>
{% for policy in access_policies %}
<tr>
<td>{{ policy.name }}</td>
<td>{{ policy }}</td>
<td>{{ policy.get_policy_type_display }}</td>
<td>{{ policy.groups.count }}</td>
<td>{{ policy.methods.count }}</td>

View File

@@ -23,14 +23,13 @@
<div class="row mb-4">
<div class="col-md-6">
<strong>{% trans 'Name' %}:</strong> {{ application.name }}<br>
<strong>{% trans 'Display Name' %}:</strong> {{ application.display_name }}<br>
<strong>{% trans 'Name' %}:</strong> {{ application }}<br>
<strong>{% trans 'Upstream' %}:</strong> <code>{{ application.upstream }}</code><br>
</div>
<div class="col-md-6">
<strong>{% trans 'Default Policy' %}:</strong>
{% if application.default_policy_config %}
<span>{{ application.default_policy_config.default_policy.name }}</span>
<span>{{ application.default_policy_config.default_policy }}</span>
<a href="{% url 'manage_application_policy' %}?uuid={{ application.default_policy_config.uuid }}"
class="btn btn-sm btn-outline-secondary btn-xs"><i class="fas fa-edit"></i></a>
<a href="{% url 'delete_application_policy' %}?uuid={{ application.default_policy_config.uuid }}"
@@ -112,9 +111,9 @@
<tbody>
{% for route in routes %}
<tr>
<td>{{ route.name }}</td>
<td>{{ route }}</td>
<td><code>{{ route.path_prefix }}</code></td>
<td>{{ route.policy.name }}</td>
<td>{{ route.policy }}</td>
<td>{{ route.order }}</td>
<td style="width: 15%">
<a href="{% url 'manage_application_route' %}?uuid={{ route.uuid }}"

View File

@@ -79,7 +79,7 @@
</td>
<td>
{% for group in user.groups.all %}
<span class="badge badge-info">{{ group.name }}</span>
<span class="badge badge-info">{{ group }}</span>
{% empty %}
<span class="text-muted"></span>
{% endfor %}
@@ -125,7 +125,7 @@
<tbody>
{% for group in groups %}
<tr>
<td>{{ group.name }}</td>
<td>{{ group }}</td>
<td>{{ group.users.count }}</td>
<td style="width: 15%">
<a href="{% url 'manage_gatekeeper_group' %}?uuid={{ group.uuid }}"
@@ -170,7 +170,7 @@
<tbody>
{% for method in auth_methods %}
<tr>
<td>{{ method.name }}</td>
<td>{{ method }}</td>
<td>{{ method.get_auth_type_display }}</td>
<td style="width: 15%">
<a href="{% url 'manage_gatekeeper_auth_method' %}?uuid={{ method.uuid }}"
@@ -219,7 +219,7 @@
<tr>
<td><span class="badge badge-info">{% trans 'Email' %}</span></td>
<td>{{ email.email }}</td>
<td>{{ email.auth_method.name }}</td>
<td>{{ email.auth_method }}</td>
<td style="width: 15%">
<a href="{% url 'manage_gatekeeper_email' %}?uuid={{ email.uuid }}"
class="btn btn-sm btn-info" title="{% trans 'Edit' %}">
@@ -236,7 +236,7 @@
<tr>
<td><span class="badge badge-secondary">{% trans 'Domain' %}</span></td>
<td>{{ domain.domain }}</td>
<td>{{ domain.auth_method.name }}</td>
<td>{{ domain.auth_method }}</td>
<td style="width: 15%">
<a href="{% url 'manage_gatekeeper_domain' %}?uuid={{ domain.uuid }}"
class="btn btn-sm btn-info" title="{% trans 'Edit' %}">
@@ -288,7 +288,7 @@
<span class="badge badge-danger">{% trans 'Deny' %}</span>
{% endif %}
</td>
<td>{{ ip.auth_method.name }}</td>
<td>{{ ip.auth_method }}</td>
<td style="width: 15%">
<a href="{% url 'manage_gatekeeper_ip' %}?uuid={{ ip.uuid }}"
class="btn btn-sm btn-info" title="{% trans 'Edit' %}">