[PR #3081] [MERGED] Search by User IP Adress in Audit Log #6130

Closed
opened 2026-02-05 10:25:09 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3081
Author: @johnroyer
Created: 11/26/2021
Status: Merged
Merged: 12/18/2021
Merged by: @ssddanbrown

Base: masterHead: search-by-ip


📝 Commits (10+)

  • 9cac6fa Add IP address search field mock
  • 0e25298 Fix label and input box error
  • 8dee3d3 Add label translation
  • a12e346 Add filter of user IP
  • 882f195 Add margin right for IP input box
  • 4e63554 Add an hidden submit
  • e686b2c Show current search IP
  • a932544 Add index for user IP address
  • 2fd7b1f Update index name to 'activities_ip_index'
  • 72d1996 Search IP by partial-equal

📊 Changes

4 files changed (+62 additions, -1 deletions)

View changed files

📝 app/Http/Controllers/AuditLogController.php (+4 -0)
database/migrations/2021_11_26_070438_add_index_for_user_ip.php (+32 -0)
📝 resources/views/settings/audit.blade.php (+8 -1)
📝 tests/AuditLogTest.php (+18 -0)

📄 Description

Features:

  • add input field for searching IP address in audit log view.
    • add a hidden submit button in view. Form submits automatically after user press Enter
  • add search type in audit log controller. IP address search in full string match. (use = not like)
  • create index for user ip address (DB migration)

UI preview :

擷取選取區域_003


Note: related with issue #2951


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3081 **Author:** [@johnroyer](https://github.com/johnroyer) **Created:** 11/26/2021 **Status:** ✅ Merged **Merged:** 12/18/2021 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `search-by-ip` --- ### 📝 Commits (10+) - [`9cac6fa`](https://github.com/BookStackApp/BookStack/commit/9cac6fad7309fcaceff82e1a6f556e969c009276) Add IP address search field mock - [`0e25298`](https://github.com/BookStackApp/BookStack/commit/0e25298db9f82555564db7f1703757a24024938e) Fix label and input box error - [`8dee3d3`](https://github.com/BookStackApp/BookStack/commit/8dee3d3a837f1474c9f2045b02a2270dcc658883) Add label translation - [`a12e346`](https://github.com/BookStackApp/BookStack/commit/a12e346439553b956d55e973e3a75184f7859031) Add filter of user IP - [`882f195`](https://github.com/BookStackApp/BookStack/commit/882f1959278ca1f62e0b17b4222d36230027cdcf) Add margin right for IP input box - [`4e63554`](https://github.com/BookStackApp/BookStack/commit/4e63554cc61fee91d7f3a3e3d26f8c207c86c47b) Add an hidden submit - [`e686b2c`](https://github.com/BookStackApp/BookStack/commit/e686b2cf3ce5fcc2a822746a0573623ecbcb91ec) Show current search IP - [`a932544`](https://github.com/BookStackApp/BookStack/commit/a93254430c3ab643175d9caec20d60bb5a2e3bd2) Add index for user IP address - [`2fd7b1f`](https://github.com/BookStackApp/BookStack/commit/2fd7b1f0d5e543f8ccfca0d8014f9574a5847494) Update index name to 'activities_ip_index' - [`72d1996`](https://github.com/BookStackApp/BookStack/commit/72d19968dd777a90c7f2318797a464dac312c6ee) Search IP by partial-equal ### 📊 Changes **4 files changed** (+62 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/AuditLogController.php` (+4 -0) ➕ `database/migrations/2021_11_26_070438_add_index_for_user_ip.php` (+32 -0) 📝 `resources/views/settings/audit.blade.php` (+8 -1) 📝 `tests/AuditLogTest.php` (+18 -0) </details> ### 📄 Description Features: - add input field for searching IP address in audit log view. - add a hidden submit button in view. Form submits automatically after user press `Enter` - add search type in audit log controller. IP address search in full string match. (use `=` not `like`) - create index for user ip address (DB migration) UI preview : ![擷取選取區域_003](https://user-images.githubusercontent.com/114491/143542384-90b215b9-c229-4571-9d97-6715e19da723.png) ---- Note: related with issue #2951 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:25:09 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6130