06/05 Optimize app: logs will be saved to db
This commit is contained in:
@@ -4,16 +4,54 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="pcard pcard-sm mb-3">
|
||||
<form method="GET" class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<select name="action" class="form-select form-select-sm" style="max-width:220px;">
|
||||
<option value="">All events</option>
|
||||
{% for a in actions %}
|
||||
<option value="{{ a }}" {% if a == action %}selected{% endif %}>{{ a | replace('_',' ') | title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary"><i class="bi bi-filter me-1"></i>Filter</button>
|
||||
{% if action %}<a href="{{ url_for('settings.audit_log') }}" class="btn btn-sm btn-outline-secondary"><i class="bi bi-x-lg"></i></a>{% endif %}
|
||||
</form>
|
||||
<div class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<form method="GET" class="d-flex gap-2 align-items-center flex-wrap">
|
||||
<select name="action" class="form-select form-select-sm" style="max-width:220px;">
|
||||
<option value="">All events</option>
|
||||
{% for a in actions %}
|
||||
<option value="{{ a }}" {% if a == action %}selected{% endif %}>{{ a | replace('_',' ') | title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary"><i class="bi bi-filter me-1"></i>Filter</button>
|
||||
{% if action %}<a href="{{ url_for('settings.audit_log') }}" class="btn btn-sm btn-outline-secondary"><i class="bi bi-x-lg"></i></a>{% endif %}
|
||||
</form>
|
||||
|
||||
<div class="ms-auto">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-sm btn-outline-warning dropdown-toggle" type="button"
|
||||
data-bs-toggle="dropdown" title="Purge old audit log entries">
|
||||
<i class="bi bi-clock-history me-1"></i>Purge
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end" style="font-size:13px;">
|
||||
<li><h6 class="dropdown-header">Delete entries older than…</h6></li>
|
||||
<li>
|
||||
<form method="POST" action="{{ url_for('settings.audit_purge') }}"
|
||||
onsubmit="return confirm('Delete audit log entries older than 7 days?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="days" value="7">
|
||||
<button type="submit" class="dropdown-item">7 days</button>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form method="POST" action="{{ url_for('settings.audit_purge') }}"
|
||||
onsubmit="return confirm('Delete audit log entries older than 30 days?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="days" value="30">
|
||||
<button type="submit" class="dropdown-item">30 days</button>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form method="POST" action="{{ url_for('settings.audit_purge') }}"
|
||||
onsubmit="return confirm('Delete audit log entries older than 90 days?')">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="days" value="90">
|
||||
<button type="submit" class="dropdown-item">90 days</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pcard p-0">
|
||||
|
||||
Reference in New Issue
Block a user