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

Audit logs #683

Merged
merged 16 commits into from
Sep 23, 2022
Merged

Audit logs #683

merged 16 commits into from
Sep 23, 2022

Conversation

rabstejnek
Copy link
Collaborator

@rabstejnek rabstejnek commented Aug 16, 2022

Added audit logs for assessment, animal, epidemiology, risk of bias, and summary apps at the assessment level. These logs are retrieved from reversion.

The frontend has been updated to include download links for these audit logs on the assessment logs page, and reversion logs are now included on the object logs page.

image
Download links are available in the Actions dropdown on the assessment logs page.
image
The table on the object logs page has been updated to include the serialized data snapshot that is stored by reversion.

Run this command to create initial revisions as needed:

manage createinitialrevisions

In addition, new initial revisions are created daily if they're needed via a celery task.

@rabstejnek rabstejnek changed the title WIP: audit logs Audit logs Aug 29, 2022
@rabstejnek rabstejnek marked this pull request as ready for review August 29, 2022 17:30
@shapiromatron shapiromatron changed the base branch from main to next August 31, 2022 11:59
Copy link
Owner

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

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

Whew, this is another big body of work. I made a number of edits, but are happy with the final result, but I made some larger changes so your review @rabstejnek would be nice to confirm I didn't break something.

Changes include:

  • Added a daily task to build any missing initial reversions
  • Update permissions with API exports to make consistent with log views
  • Update tabular exports, merging summary and assessment and adding more assessment details
  • Moving the Change log urls to the animal app, since that seems more widely logged
  • Restyle the item log list page
  • Rewrite the event comparison manager. I noticed some cases where the item log list returned a list of zero items, but at least one item existed on the assessment log page. This seems to have corrected it, but this code was very tricky!

Copy link
Collaborator Author

@rabstejnek rabstejnek left a comment

Choose a reason for hiding this comment

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

The changes look good!

created: datetime


class EventPair:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a much better approach!

@rabstejnek rabstejnek merged commit 42f8bfc into next Sep 23, 2022
@rabstejnek rabstejnek deleted the audit-logs branch September 23, 2022 16:37
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.

2 participants