Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions airflow-core/docs/howto/customize-ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ To add static alert messages that remain constant until the webserver is restart

.. code-block:: python

from airflow.www.utils import UIAlert
from airflow.api_fastapi.common.types import UIAlert

DASHBOARD_UIALERTS = [
UIAlert("Welcome to Airflow"),
UIAlert("Welcome to Airflow", category="info"),
]

3. Restart the Airflow webserver, and you should now see the alert message displayed on the dashboard.
Expand Down Expand Up @@ -121,7 +121,7 @@ message of heading 2 with a link included:

.. code-block:: python

from airflow.www.utils import UIAlert
from airflow.api_fastapi.common.types import UIAlert

DASHBOARD_UIALERTS = [
UIAlert(text="## Visit [airflow.apache.org](https://airflow.apache.org)", category="info"),
Expand Down Expand Up @@ -163,7 +163,7 @@ cases might include alerts yielded from APIs, database queries or files.
.. code-block:: python

import random
from airflow.www.utils import UIAlert
from airflow.api_fastapi.common.types import UIAlert


class DynamicAlerts(list):
Expand Down