-
-
-
-
- {% trans 'Event Log' %}
-
-
-
-
-
-
-
-
-
- {% trans 'Action' %} |
- {% trans 'Context' %} |
- {% trans 'User' %} |
- {% trans 'Creation Date' %} |
- {% trans 'Client IP' %} |
-
-
-
- {% for entry in object_list %}
-
-
-
- {{ entry.action }}
- {{ entry.app|default:'-' }}
-
- |
-
-
-
- {{ entry.context }}
-
- {% if entry.user.on_behalf_of %}
-
- {% blocktrans with username=entry.user.on_behalf_of.username %}
- On behalf of {{ username }}
- {% endblocktrans %}
-
- {% endif %}
-
- |
-
-
- {{ entry.user.username }}
-
- {% blocktrans with pk=entry.user.pk %}
- ID: {{ pk }}
- {% endblocktrans %}
-
-
- |
-
-
- {{ entry.created }}
-
- |
-
-
- {{ entry.client_ip }}
-
- |
-
- {% endfor %}
-
-
-
-
-
-
-{% endblock %}
diff --git a/authentik/events/urls.py b/authentik/events/urls.py
deleted file mode 100644
index ff208e2b8..000000000
--- a/authentik/events/urls.py
+++ /dev/null
@@ -1,9 +0,0 @@
-"""authentik events urls"""
-from django.urls import path
-
-from authentik.events.views import EventListView
-
-urlpatterns = [
- # Event Log
- path("log/", EventListView.as_view(), name="log"),
-]
diff --git a/authentik/events/views.py b/authentik/events/views.py
deleted file mode 100644
index 0bbb83f2b..000000000
--- a/authentik/events/views.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""authentik Event administration"""
-from django.contrib.auth.mixins import LoginRequiredMixin
-from django.views.generic import ListView
-from guardian.mixins import PermissionListMixin
-
-from authentik.admin.views.utils import SearchListMixin, UserPaginateListMixin
-from authentik.events.models import Event
-
-
-class EventListView(
- PermissionListMixin,
- LoginRequiredMixin,
- SearchListMixin,
- UserPaginateListMixin,
- ListView,
-):
- """Show list of all invitations"""
-
- model = Event
- template_name = "events/list.html"
- permission_required = "authentik_events.view_event"
- ordering = "-created"
-
- search_fields = [
- "user",
- "action",
- "app",
- "context",
- "client_ip",
- ]
diff --git a/authentik/flows/api.py b/authentik/flows/api.py
index 2ac784c7d..4389f8fe9 100644
--- a/authentik/flows/api.py
+++ b/authentik/flows/api.py
@@ -78,6 +78,8 @@ class FlowViewSet(ModelViewSet):
queryset = Flow.objects.all()
serializer_class = FlowSerializer
lookup_field = "slug"
+ search_fields = ["name", "slug", "designation", "title"]
+ filterset_fields = ["flow_uuid", "name", "slug", "designation"]
@swagger_auto_schema(responses={200: FlowDiagramSerializer()})
@action(detail=True, methods=["get"])
diff --git a/authentik/root/settings.py b/authentik/root/settings.py
index 3df86786d..d68852758 100644
--- a/authentik/root/settings.py
+++ b/authentik/root/settings.py
@@ -142,7 +142,7 @@ SWAGGER_SETTINGS = {
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
"PAGE_SIZE": 100,
- 'DATETIME_FORMAT': '%s',
+ "DATETIME_FORMAT": "%s",
"DEFAULT_FILTER_BACKENDS": [
"rest_framework_guardian.filters.ObjectPermissionsFilter",
"django_filters.rest_framework.DjangoFilterBackend",
diff --git a/swagger.yaml b/swagger.yaml
index 5da72c14d..a577d2f9a 100755
--- a/swagger.yaml
+++ b/swagger.yaml
@@ -868,6 +868,11 @@ paths:
operationId: events_events_list
description: Event Read-Only Viewset
parameters:
+ - name: action
+ in: query
+ description: ''
+ required: false
+ type: string
- name: ordering
in: query
description: Which field to use when ordering the results.
@@ -919,6 +924,11 @@ paths:
operationId: events_events_top_per_user
description: Get the top_n events grouped by user count
parameters:
+ - name: action
+ in: query
+ description: ''
+ required: false
+ type: string
- name: ordering
in: query
description: Which field to use when ordering the results.
@@ -1194,6 +1204,26 @@ paths:
operationId: flows_instances_list
description: Flow Viewset
parameters:
+ - name: flow_uuid
+ in: query
+ description: ''
+ required: false
+ type: string
+ - name: name
+ in: query
+ description: ''
+ required: false
+ type: string
+ - name: slug
+ in: query
+ description: ''
+ required: false
+ type: string
+ - name: designation
+ in: query
+ description: ''
+ required: false
+ type: string
- name: ordering
in: query
description: Which field to use when ordering the results.
diff --git a/web/src/api/Events.ts b/web/src/api/Events.ts
index 408e38dec..b0b08fd65 100644
--- a/web/src/api/Events.ts
+++ b/web/src/api/Events.ts
@@ -1,6 +1,37 @@
-import { DefaultClient } from "./Client";
+import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+
+export interface EventUser {
+ pk: number;
+ email?: string;
+ username: string;
+ on_behalf_of?: EventUser;
+}
+
+export interface EventContext {
+ [key: string]: EventContext | string | number;
+}
export class Event {
+ pk: string;
+ user: EventUser;
+ action: string;
+ app: string;
+ context: EventContext;
+ client_ip: string;
+ created: string;
+
+ constructor() {
+ throw Error();
+ }
+
+ static get(pk: string): Promise