Skip to content

Issue #3163716: Add next and previous buttons to database log entry pages

Closes #3163716

Problem/Motivation

When viewing an individual database log event page, it can be cumbersome to return to the listing page and find the next or previous event manually. This is especially inefficient when debugging a sequence of related log entries.

Proposed resolution

This merge request introduces "Next" and "Previous" buttons on the individual event detail pages (/admin/reports/dblog/event/{event_id}) to allow users to navigate between log entries in sequential order based on their wid.

Key changes

  • Added getAdjacentEventId() helper method in DbLogController to fetch the previous and next log entry IDs.
  • Rendered navigation buttons conditionally if adjacent entries exist.
  • Added functional test coverage to DbLogTest:
    • Basic navigation through log entries.
    • Edge cases: no entries, single entry, deleted entry after navigation.

Known limitations

  • The navigation is based solely on wid, which generally reflects the order of insertion but is not tied to timestamps.
  • Does not add keyboard navigation or sticky navigation UI, which could be considered in a follow-up.

Merge request reports

Loading