-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
chore: add event logger to reports/alerts CRUD #20249
chore: add event logger to reports/alerts CRUD #20249
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20249 +/- ##
===========================================
- Coverage 66.50% 54.60% -11.91%
===========================================
Files 1726 1726
Lines 64789 64892 +103
Branches 6829 6832 +3
===========================================
- Hits 43090 35432 -7658
- Misses 19967 27728 +7761
Partials 1732 1732
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
d26e290
to
7aac7aa
Compare
7aac7aa
to
b68513c
Compare
superset/reports/api.py
Outdated
@permission_name("delete") | ||
@statsd_metrics | ||
@event_logger.log_this_with_context( | ||
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.data",
superset/reports/api.py
Outdated
@@ -416,6 +429,10 @@ def put(self, pk: int) -> Response: | |||
@safe | |||
@statsd_metrics | |||
@rison(get_delete_ids_schema) | |||
@event_logger.log_this_with_context( | |||
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.delete", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.delete_bulk
superset/reports/api.py
Outdated
@@ -281,6 +286,10 @@ def delete(self, pk: int) -> Response: | |||
@statsd_metrics | |||
@permission_name("post") | |||
@requires_json | |||
@event_logger.log_this_with_context( | |||
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.create", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post
superset/reports/api.py
Outdated
@@ -344,6 +353,10 @@ def post(self) -> Response: | |||
@statsd_metrics | |||
@permission_name("put") | |||
@requires_json | |||
@event_logger.log_this_with_context( | |||
action=lambda self, *args, **kwargs: f"{self.__class__.__name__}.modify", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put?
ee0d81f
to
d088a21
Compare
d088a21
to
7d8312d
Compare
7d8312d
to
397f52c
Compare
82c0b28
to
9fedaaa
Compare
9fedaaa
to
0ff1eaf
Compare
0ff1eaf
to
9b5baeb
Compare
SUMMARY
Previously we did not have any tracking for Report CRUD actions, this adds that.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION