bhavaniravi commented on code in PR #24079:
URL: https://github.com/apache/airflow/pull/24079#discussion_r896609957


##########
airflow/www/views.py:
##########
@@ -3667,6 +3667,19 @@ class AirflowModelView(ModelView):
 
     CustomSQLAInterface = wwwutils.CustomSQLAInterface
 
+    def __getattribute__(self, attr):
+        attribute = object.__getattribute__(self, attr)
+        if callable(attribute) and attr in [
+            "add",
+            "edit",
+            "delete",
+            "download",
+            "action",
+            "action_post",
+        ]:
+            return 
action_logging(event=f"{self.route_base.strip('/')}.{attr}")(attribute)
+        return attribute

Review Comment:
   The problem with overriding is how to generate the event name at the 
decorator level. `{self.route_base.strip('/')}.{attr}` we won't have the `self` 
to recognize if the action is for variable or connection



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to