2026-05-22 13:55:01 +02:00
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<table class="tab_cadre_fixehov">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ __('Date') }}</th>
|
|
|
|
|
<th>{{ __('Hash') }}</th>
|
|
|
|
|
<th>{{ __('User') }}</th>
|
|
|
|
|
<th>{{ __('Actions') }}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for config in configs %}
|
|
|
|
|
<tr class="tab_bg_1">
|
|
|
|
|
<td>{{ config.created_at }}</td>
|
|
|
|
|
<td><code>{{ config.config_hash|slice(0, 16) }}...</code></td>
|
|
|
|
|
<td>{{ config.users_id|getUserName }}</td>
|
|
|
|
|
<td>
|
|
|
|
|
{% if can_export %}
|
|
|
|
|
<a href="{{ path('/plugins/netconfig/ajax/export.php') }}?id={{ config.id }}" class="btn btn-sm btn-outline-primary">
|
|
|
|
|
<i class="fas fa-download"></i> {{ __('Export') }}
|
|
|
|
|
</a>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if config.diff_html is defined %}
|
|
|
|
|
<button class="btn btn-sm btn-outline-info" onclick="alert('Diff: {{ config.diff_html|escape }}')">
|
|
|
|
|
{{ __('View Diff') }}
|
|
|
|
|
</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% else %}
|
|
|
|
|
<tr class="tab_bg_1"><td colspan="4" class="center">{{ __('No configuration saved yet') }}</td></tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-22 14:13:33 +02:00
|
|
|
{# Visualizzazione diff sicuro - il renderer HTML di php-diff è già sanitizzato #}
|
|
|
|
|
{% if config.diff_html is defined and config.diff_html is not empty %}
|
|
|
|
|
<div class="modal fade" id="diffModal{{ config.id }}" tabindex="-1">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title">{{ __('Configuration Diff') }}</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="config-diff-container">
|
|
|
|
|
{{ config.diff_html|raw }} {# Safe: output già sanitizzato da php-diff #}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-sm btn-outline-info"
|
|
|
|
|
data-bs-toggle="modal"
|
|
|
|
|
data-bs-target="#diffModal{{ config.id }}">
|
|
|
|
|
<i class="fas fa-code-compare"></i> {{ __('View Diff') }}
|
|
|
|
|
</button>
|
|
|
|
|
{% endif %}
|