feat: enhance category display in ban tables and adjust chart height

This commit is contained in:
Lorenzo Venerandi
2026-03-08 12:31:37 +01:00
parent 2539713a1d
commit 4df6c1f2ec
3 changed files with 3 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
<td class="rank">{{ loop.index + (pagination.page - 1) * pagination.page_size }}</td> <td class="rank">{{ loop.index + (pagination.page - 1) * pagination.page_size }}</td>
<td>{{ ip.ip | e }}</td> <td>{{ ip.ip | e }}</td>
<td>{{ ip.total_requests }}</td> <td>{{ ip.total_requests }}</td>
<td><span class="category-badge category-{{ ip.category | default('unknown') }}">{{ ip.category | default('unknown') | e }}</span></td> <td><span class="category-badge category-{{ ip.category | default('unknown') | replace('_', '-') }}">{{ ip.category | default('unknown') | replace('_', ' ') | title }}</span></td>
<td>{{ ip.city | default('') | e }}{% if ip.city and ip.country_code %}, {% endif %}{{ ip.country_code | default('N/A') | e }}</td> <td>{{ ip.city | default('') | e }}{% if ip.city and ip.country_code %}, {% endif %}{{ ip.country_code | default('N/A') | e }}</td>
<td>{{ ip.last_seen | format_ts }}</td> <td>{{ ip.last_seen | format_ts }}</td>
<td> <td>

View File

@@ -39,7 +39,7 @@
<span class="ban-override-badge ban-override-unbanned">Force Unbanned</span> <span class="ban-override-badge ban-override-unbanned">Force Unbanned</span>
{% endif %} {% endif %}
</td> </td>
<td><span class="category-badge category-{{ ip.category | default('unknown') }}">{{ ip.category | default('unknown') | e }}</span></td> <td><span class="category-badge category-{{ ip.category | default('unknown') | replace('_', '-') }}">{{ ip.category | default('unknown') | replace('_', ' ') | title }}</span></td>
<td>{{ ip.total_requests }}</td> <td>{{ ip.total_requests }}</td>
<td>{{ ip.city | default('') | e }}{% if ip.city and ip.country_code %}, {% endif %}{{ ip.country_code | default('N/A') | e }}</td> <td>{{ ip.city | default('') | e }}{% if ip.city and ip.country_code %}, {% endif %}{{ ip.country_code | default('N/A') | e }}</td>
<td>{{ ip.last_seen | format_ts }}</td> <td>{{ ip.last_seen | format_ts }}</td>

View File

@@ -716,9 +716,8 @@ tbody {
min-width: 0; min-width: 0;
} }
.ip-attack-chart-wrapper { .ip-attack-chart-wrapper {
flex: 1;
position: relative; position: relative;
min-height: 180px; height: 220px;
} }
/* Radar chart */ /* Radar chart */