Repository: apache/airflow

Issue:
option to disable "lots of circles" in error page
**Description**

The "lots of circles" error page is very rough via Remote Desktop connections. In the current global pandemic many people are working remotely via already constrained connections. Needless redraws caused by the highly animated circles can cause frustrating slowdowns and sometimes lost connections.

**Use case / motivation**

It should be trivially simple to disable the animated portion of the error page and instead use a standard error page. Ideally this would be something easily achievable via configuration options and exposed in the Helm chart.

**Related Issues**

N/A



Discussion:
Thanks for opening your first issue here! Be sure to follow the issue template!

That's a vaild point I must say.
If any would like to pick it up, I am all for making this page static.
@potiuk Would love to try to solve this one. 
@jpmarques66  I assigned you to this ticket 🐈
@jpmarques66 I can see that you are not active on this ticket, so I unassigned you from this ticket.  Now another contributor can start working on it. If you want to continue working, let me know and I will assign you again.
I'm looking to make my first contribution to the project, I've just been looking at how this is rendered and I've got a pretty good idea how we could implement this.

If the `airflow.cfg` file contains something like `circles_dynamic`, we could fetch the value when rendering the circles HTML template [here](https://github.com/apache/airflow/blob/4cde47b339d5ab5e4ebccfb22962ccbfc4c5457e/airflow/www/views.py#L368) where the default fallback value is `True`, meaning this SVG will by default behave as it currently does.

In the [circles.html](https://github.com/apache/airflow/blob/4cde47b339d5ab5e4ebccfb22962ccbfc4c5457e/airflow/www/templates/airflow/circles.html#L37) template, we could use Jinja to determine whether or not to load the default `circles.js` or some new file, called `circles_static.js`, which simply draws the circles once, without redrawing them constantly, which I understand to be the root cause of this issue right @jameswynn ?

Open to suggestions, this is just the first method that came to my mind!

Alternatively, instead of adding _another_ config item. We could just get rid of the lots of circles. It doesn't really provide anything useful, as far as I'm aware.
I also have similar issue as OP. I use VNC a lot, and it causes sever frame rate drop, as well causes serious CPU usage increase on both VNC server and client (to the point that the small client PC spins CPU fan to the max). I wish it was just gone. No need for it to be configurable. Airflow already has too many configuration options IMHO.

Resolving patch:
diff --git a/airflow/www/extensions/init_views.py b/airflow/www/extensions/init_views.py
--- a/airflow/www/extensions/init_views.py
+++ b/airflow/www/extensions/init_views.py
@@ -144,7 +144,7 @@ def init_error_handlers(app: Flask):
     from airflow.www import views
 
     app.register_error_handler(500, views.show_traceback)
-    app.register_error_handler(404, views.circles)
+    app.register_error_handler(404, views.not_found)
 
 
 def set_cors_headers_on_response(response):
@@ -177,7 +177,7 @@ def _handle_api_error(ex):
             # here on the application level
             return common_error_handler(ex)
         else:
-            return views.circles(ex)
+            return views.not_found(ex)
 
     spec_dir = path.join(ROOT_APP_DIR, 'api_connexion', 'openapi')
     connexion_app = connexion.App(__name__, specification_dir=spec_dir, skip_error_handlers=True)
diff --git a/airflow/www/views.py b/airflow/www/views.py
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -410,11 +410,11 @@ def get_downstream(task):
 ######################################################################################
 
 
-def circles(error):
-    """Show Circles on screen for any error in the Webserver"""
+def not_found(error):
+    """Show Not Found on screen for any error in the Webserver"""
     return (
         render_template(
-            'airflow/circles.html',
+            'airflow/not_found.html',
             hostname=socket.getfqdn()
             if conf.getboolean('webserver', 'EXPOSE_HOSTNAME', fallback=True)
             else 'redact',


Test patch: