Let users filter by type of event

At the moment we have two types of event, ‘service’ events and ‘API key’
events. They are munged together which is useful initially, but could
get noisy.

This commit adds filters (copied from the choose template page) that let
users narrow down the list to one of the two types of event. This might
help users get a clearer picture of what’s going on.
This commit is contained in:
Chris Hill-Scott
2019-10-21 13:16:48 +01:00
parent d93ebd99d3
commit 63f6a3ab12
4 changed files with 90 additions and 28 deletions

View File

@@ -1,14 +1,25 @@
{% extends "withnav_template.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/table.html" import list_table, field %}
{% from "components/pill.html" import pill %}
{% block service_page_title %}
Service and API key history
Audit events
{% endblock %}
{% block maincolumn_content %}
{{ page_header("Service and API key history") }}
{{ page_header("Audit events") }}
{{ pill(
[
('All', None, url_for('main.history', service_id=current_service.id), None),
('Service', 'service', url_for('main.history', service_id=current_service.id, selected='service'), None),
('API keys', 'api', url_for('main.history', service_id=current_service.id, selected='api'), None),
],
request.args.get('selected'),
show_count=False
) }}
{% for day, events in days %}
<h2 class="heading-small top-gutter">