diff --git a/logs/templates/logs/machine_history.html b/logs/templates/logs/machine_history.html index 93e1817a..5aea5e9d 100644 --- a/logs/templates/logs/machine_history.html +++ b/logs/templates/logs/machine_history.html @@ -66,6 +66,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% endfor %} + {% include 'pagination.html' with list=events %} {% else %}

{% trans "No result" %}

{% endif %} diff --git a/logs/views.py b/logs/views.py index ca75e48f..7e6df54a 100644 --- a/logs/views.py +++ b/logs/views.py @@ -489,16 +489,19 @@ def stats_search_machine_history(request): history_form = MachineHistoryForm(request.GET or None) if history_form.is_valid(): history = MachineHistory() + events = history.get( + history_form.cleaned_data.get("q", ""), + history_form.cleaned_data + ) + max_result = GeneralOption.get_cached_value("search_display_page") + re2o_paginator(request, + events, + max_result) + return render( request, "logs/machine_history.html", - { - "events": - history.get( - history_form.cleaned_data.get("q", ""), - history_form.cleaned_data - ) - }, + { "events": events }, ) return render(request, "logs/search_machine_history.html", {"history_form": history_form})