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

Model Change Logging #404

Merged
merged 40 commits into from Apr 5, 2021
Merged

Model Change Logging #404

merged 40 commits into from Apr 5, 2021

Conversation

felixrindt
Copy link
Member

@felixrindt felixrindt commented Mar 27, 2021

  • tests
  • Full-text-search in the FilterForm
  • rename db_instance to be a copy of the instance from the post_init signal
  • views
    • generic view
    • teaser on index page
  • refactor json structure {str: ..., fields: [ {slug: ..., data: ...}, ... ]}
  • refactor |linkify for get_absolute_url
  • refactor object select
    • heterolog heavy select2
  • view_logentry permission for managers?
  • log group permissions

Ideas:

  • clickable links to absolute urls -> doesn't really fit our needs
  • diffs on large text changes -> difflib exists, but it's more work than I want to currently spend for the benefit.
  • clicking an object link makes it the filter?! --> not useful enough

@coveralls
Copy link

coveralls commented Mar 27, 2021

Coverage Status

Coverage increased (+0.6%) to 89.376% when pulling 1d00d6c on feature/logging into 074d9b0 on main.

@felixrindt felixrindt force-pushed the feature/logging branch 2 times, most recently from 2868f78 to 63cc254 Compare March 28, 2021 15:04
@jeriox

This comment has been minimized.

Copy link
Contributor

@jeriox jeriox left a comment

Choose a reason for hiding this comment

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

lgtm

ephios/modellogging/models.py Outdated Show resolved Hide resolved
ephios/modellogging/templates/modellogging/logentries.html Outdated Show resolved Hide resolved
@felixrindt felixrindt requested a review from jeriox March 30, 2021 14:39
@felixrindt felixrindt marked this pull request as ready for review March 30, 2021 14:46
@felixrindt
Copy link
Member Author

felixrindt commented Mar 30, 2021

We need to decide where to show the log and to whom.
Rendering the log requires - due to the architecture, a lot of queries.

  • Events, Shifts and Participations are currently logged together. I propose a separate view visible to event responsibles where they can view the log.
  • We can add logging to users (but not groups, sadly, as we can't access that model) as well, though I wouldn't show the log anywhere specifically. Instead
  • We can create a View where you can filter logs based on content type, timeframe and acting user. Useful for support staff and managers(?)/staff users!

@jeriox
Copy link
Contributor

jeriox commented Mar 31, 2021

We need to decide where to show the log and to whom.
Rendering the log requires - due to the architecture, a lot of queries.

* Events, Shifts and Participations are currently logged together. I propose a separate view visible to event responsibles where they can view the log.

sounds good

* We can add logging to users (but not groups, sadly, as we can't access that model) as well, though I wouldn't show the log anywhere specifically. Instead

* We can create a View where you can filter logs based on content type, timeframe and acting user. Useful for support staff and managers(?)/staff users!

also sounds good. I still like the idea of having a few of the latest actions on the homepage for managers with a link to the view that you just mentioned.

@felixrindt felixrindt force-pushed the feature/logging branch 2 times, most recently from 22c3150 to 3cbe1fb Compare April 2, 2021 21:59
@jeriox

This comment has been minimized.

@jeriox

This comment has been minimized.

@jeriox

This comment has been minimized.

ephios/core/views/log.py Outdated Show resolved Hide resolved
@felixrindt felixrindt force-pushed the feature/logging branch 2 times, most recently from cef0687 to 57ae826 Compare April 5, 2021 09:08
@felixrindt felixrindt force-pushed the feature/logging branch 2 times, most recently from 1cd54eb to 382d815 Compare April 5, 2021 17:26
ephios/core/models/users.py Outdated Show resolved Hide resolved
ephios/core/templates/core/pagination.html Outdated Show resolved Hide resolved
ephios/core/views/event.py Outdated Show resolved Hide resolved
ephios/core/views/event.py Outdated Show resolved Hide resolved
ephios/modellogging/json.py Outdated Show resolved Hide resolved
ephios/modellogging/middleware.py Outdated Show resolved Hide resolved
ephios/modellogging/recorders.py Show resolved Hide resolved
@jeriox

This comment has been minimized.

@jeriox

This comment has been minimized.

@jeriox

This comment has been minimized.

@felixrindt felixrindt merged commit 847691b into main Apr 5, 2021
@felixrindt felixrindt deleted the feature/logging branch April 5, 2021 21:33
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.

None yet

3 participants