Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: document history (audit log UI) #6388

Merged
merged 20 commits into from
Apr 23, 2024
Merged

Feature: document history (audit log UI) #6388

merged 20 commits into from
Apr 23, 2024

Conversation

shamoon
Copy link
Member

@shamoon shamoon commented Apr 14, 2024

Proposed change

See screenshots, there are also some small improvements to the audit log.

Screenshot 2024-04-13 at 10 46 52 PM Screenshot 2024-04-13 at 10 45 52 PM Screenshot 2024-04-13 at 10 45 06 PM

Type of change

  • Bug fix: non-breaking change which fixes an issue.
  • New feature / Enhancement: non-breaking change which adds functionality. Please read the important note above.
  • Breaking change: fix or feature that would cause existing functionality to not work as expected.
  • Documentation only.
  • Other. Please explain:

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@shamoon shamoon requested review from a team as code owners April 14, 2024 06:50
@paperless-ngx-secretary paperless-ngx-secretary bot added backend documentation Improvements or additions to documentation frontend non-trivial Requires approval by several team members labels Apr 14, 2024
@github-actions github-actions bot added the enhancement New feature label Apr 14, 2024
Copy link

codecov bot commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.05%. Comparing base (d65fcf7) to head (975429c).

❗ Current head 975429c differs from pull request most recent head 760c16b. Consider uploading reports for the commit 760c16b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6388   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files         420      423    +3     
  Lines       16900    16964   +64     
  Branches     1290     1225   -65     
=======================================
+ Hits        16402    16465   +63     
- Misses        496      499    +3     
+ Partials        2        0    -2     
Flag Coverage Δ
backend 95.81% <100.00%> (-0.01%) ⬇️
frontend 98.54% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shamoon shamoon removed the documentation Improvements or additions to documentation label Apr 14, 2024
@shamoon shamoon modified the milestones: Next Feature Release, Next Bugfix Release, Next Release Apr 14, 2024
@shamoon shamoon added this to the Next Release milestone Apr 16, 2024
@shamoon shamoon added the notable Flag PRs to highlight in releases label Apr 18, 2024
src/documents/views.py Outdated Show resolved Hide resolved
@shamoon shamoon force-pushed the feature-auditlog-ui branch 2 times, most recently from 6fc5c70 to 0bbe8c6 Compare April 19, 2024 08:16
@shamoon shamoon enabled auto-merge (squash) April 19, 2024 08:17
Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two little things to keep the SQL minimal(ish)

src/documents/views.py Outdated Show resolved Hide resolved
src/documents/views.py Show resolved Hide resolved
@shamoon
Copy link
Member Author

shamoon commented Apr 20, 2024

Thanks stumpy, yea definitely want to do better looking out for those. Remind me, did you say there was a good tool to view the queries for a request?

@stumpylog
Copy link
Member

stumpylog commented Apr 20, 2024

Not that I have found. I usually use the test, fail it delibratly so I can view stdout out, and use:

from django.db import connection
from django.db import reset_queries
from pprint import pprint as print
reset_queries()

thing to look at 

for x in connection.queries:
  print(x)

and kind of manually count the number and scope of queries.

If you find something better, I'm all ears.

Edit/Ps: I'm kind of looking through the views for more ones like this

@shamoon
Copy link
Member Author

shamoon commented Apr 20, 2024

Awesome, yea that works. I just found https://github.com/jazzband/django-debug-toolbar but not trivial to install. Thanks for the snippet!

@shamoon shamoon merged commit 05b1ff9 into dev Apr 23, 2024
25 checks passed
@shamoon shamoon deleted the feature-auditlog-ui branch April 23, 2024 15:16
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. See our contributing guidelines for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend enhancement New feature frontend non-trivial Requires approval by several team members notable Flag PRs to highlight in releases
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants