Skip to content

feat(logs): add connection and run-by-you filters - #712

Merged
chrisclark merged 1 commit into
explorerhq:masterfrom
DangTAnh:pr/665-log-filters
Oct 6, 2026
Merged

chrisclark merged 1 commit into
explorerhq:masterfrom
DangTAnh:pr/665-log-filters

Conversation

@DangTAnh

@DangTAnh DangTAnh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The Recent Query Logs page had no filtering, so finding runs for a specific connection or your own runs meant paging through everything. This adds two query-param filters to ListQueryLogView (connection and run_by_me) plus a filter form on the logs page. No new dependencies (plain GET params instead of django-filter) and no log schema changes.

Changes

  • explorer/views/list.py: ListQueryLogView filters by database_connection_id and current user, exposes filter context (connections, selection, querystring)
  • explorer/templates/explorer/querylog_list.html: connection dropdown + "Run by you" checkbox form; pagination links preserve active filters
  • explorer/tests/test_views.py: filter-by-connection (incl. invalid value ignored) and run-by-me tests

Testing

  • manage.py test explorer.tests.test_views.TestQueryLog --settings=explorer.tests.settings_base — 8 tests OK
  • manage.py test explorer --settings=explorer.tests.settings_base — 276 tests, only 2 pre-existing failures unrelated to this change (assistant history ordering and a Windows-path assertion, both fail on clean master too)

Related

Fixes #665

@chrisclark
chrisclark merged commit faf653e into explorerhq:master Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Filtering on the query logs

2 participants