Open
Conversation
Test results 21 files 21 suites 25m 19s ⏱️ Results for commit 35e0dc7. ♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3776 +/- ##
==========================================
+ Coverage 63.23% 63.33% +0.10%
==========================================
Files 617 618 +1
Lines 45662 45813 +151
Branches 43 43
==========================================
+ Hits 28874 29016 +142
- Misses 16778 16787 +9
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dc7d813 to
af7aade
Compare
Add actor_sortkey, object_sortkey, and target_sortkey columns to the auditlog_logentry table. These store the human-readable display name at write time, enabling efficient database-level sorting and searching, and preserving display names after referenced objects are deleted.
56f4174 to
0d458cb
Compare
d4445f6 to
3837d41
Compare
3837d41 to
878e419
Compare
10 tasks
878e419 to
35e0dc7
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Scope and purpose
Resolves #3757
Adds sortable display name columns (
actor_sortkey,object_sortkey,target_sortkey) to auditlog entries. This enables sorting and searching on these columns, and allows showing entity links when the referenced objects still exist.Key decisions:
API v2 added: New
/api/2/auditlog/endpoint returnsactor,object, andtargetas objects with{name, url}for entity linking. The existing/api/1/auditlog/endpoint continues to return plain strings and remains unchanged. The web UI now uses v2.Migration note: The backfill operation may take some time on deployments with millions of log entries.
Testing backfill and entity links
Filter by
verb=edit-account-add-org,verb=disable-interface,verb=create-netbox,verb=delete-netbox, orverb=create-accountto observe:model_name (ID)format (e.g.,account (123)) since the object no longer exists, but the sortkey preserved the searchable textContributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.
<major>.<minor>.x). For a new feature or other additions, it should be based onmaster.