Customizing the UI¶
Customizing DAG UI Header and Airflow Page Titles¶
Airflow now allows you to customize the DAG home page header and page title. This will help distinguish between various installations of Airflow or simply amend the page text.
Note
The custom title will be applied to both the page header and the page title.
To make this change, simply:
Add the configuration option of
instance_name
under the[webserver]
section insideairflow.cfg
:
[webserver]
instance_name = "DevEnv"
Alternatively, you can set a custom title using the environment variable:
AIRFLOW__WEBSERVER__INSTANCE_NAME = "DevEnv"
Screenshots¶
Before¶

After¶

Add custom alert messages on the dashboard¶
Extra alert messages can be shown on the UI dashboard. This can be useful for warning about setup issues or announcing changes to end users. The following example shows how to add alert messages:
Add the following contents to
airflow_local_settings.py
file under$AIRFLOW_HOME/config
. Each alert message should specify a severity level (info
,warning
,error
) usingcategory
.from airflow.api_fastapi.common.types import UIAlert DASHBOARD_UIALERTS = [ UIAlert(text="Welcome to Airflow.", category="info"), UIAlert(text="Airflow server downtime scheduled for tomorrow at 10:00 AM.", category="warning"), UIAlert(text="Critical error detected!", category="error"), ]
See Configuring local settings for details on how to configure local settings.
Restart Airflow Webserver, and you should now see:

Alert messages also support Markdown. In the following example, we show an alert message of heading 2 with a link included.
DASHBOARD_UIALERTS = [ UIAlert(text="## Visit [airflow.apache.org](https://airflow.apache.org)", category="info"), ]
