Skip to content

Refactor the project audit events to use the shared template

What does this MR do?

This MR updates the Project audit events page to use the new audit events shared template. This adds the improved filtering options to this page and also adds specific filters for users so they are limited to the project only.

Screenshots

Before After
image image

Database timings

Author query

Query:

SELECT
    “audit_events”.*
FROM
    “audit_events”
WHERE
    “audit_events”.“entity_id” = 278964
    AND “audit_events”.“entity_type” = ‘Project’
    AND “audit_events”.“author_id” = 5463194
ORDER BY
    “audit_events”.“id” DESC
LIMIT 26 OFFSET 0;

Plan with execution:

 Limit  (cost=0.57..3439.92 rows=1 width=239) (actual time=81.462..81.462 rows=0 loops=1)
   Buffers: shared hit=2971
   ->  Index Scan using index_audit_events_on_entity_id_entity_type_id_desc_author_id on public.audit_events  (cost=0.57..3439.92 rows=1 width=239) (actual time=81.459..81.459 rows=0 loops=1)
         Index Cond: ((audit_events.entity_id = 278964) AND ((audit_events.entity_type)::text = 'Project'::text) AND (audit_events.author_id = 5463194))
         Buffers: shared hit=2971

Summary

Time: 81.784 ms
  - planning: 0.278 ms
  - execution: 81.506 ms
    - I/O read: 0.000 ms
    - I/O write: 0.000 ms

Shared buffers:
  - hits: 2971 (~23.20 MiB) from the buffer pool
  - reads: 0 from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

  1. Open a project audit events page
  2. Confirm that you see the audit events listed with the new filtering and table layout
  3. Change filters and confirm they filter the list of audit events
  4. Confirm that the users search list is limited to only users within the project you are in

Related #217782 (closed)

Edited by Illya Klymov

Merge request reports