气流 - 更改成功/失败颜色(色盲) [英] Airflow - Change Success/Fail colours (colour-blind)
问题描述
我希望将 Airflow 实现为我们的任务处理程序,但真正困扰我的一件事是 Web UI 中的默认成功/运行/失败颜色.
我是红色/绿色色盲(最常见),我很难一眼就区分到我想不使用它的程度.
有没有办法让我在某处编辑默认颜色?bootstrap-theme.css
也许?
真的很希望这成为可能.
谢谢!
1.10.11 版本之后,添加了自定义颜色的新功能.
来自文档
<块引用>更改 Airflow 中 TaskInstance/DagRun 状态的颜色网络服务器,执行以下步骤:
创建airflow_local_settings.py 文件并放入$PYTHONPATH 或$AIRFLOW_HOME/config 文件夹.(气流添加 $AIRFLOW_HOME/config初始化 Airflow 时的 PYTHONPATH)
将以下内容添加到airflow_local_settings.py 文件中.改变颜色随心所欲.
STATE_COLORS = {排队":黑灰",正在运行":#01FF70",成功":#2ECC40",失败":耐火砖",up_for_retry":黄色",up_for_reschedule":绿松石",upstream_failed":橙色",跳过":黑兰花",预定":棕褐色",}
重启 Airflow 网络服务器.
查看文档此处>
I'm looking to implement Airflow as our task handler but one thing that is realllly bothering me is the default success/running/failed colours in the Web UI.
I'm colour-blind red/green (most common) and it's extremely hard to differentiate at a glance for me to the point I'm thinking about not using it.
Is there a way for me to edit the default colours somewhere? bootstrap-theme.css
perhaps?
Really really want this to be possible.
Thanks!
After version 1.10.11, new feature added to customize colors.
From doc
To change the colors for TaskInstance/DagRun State in the Airflow Webserver, perform the following steps:
Create airflow_local_settings.py file and put in on $PYTHONPATH or to $AIRFLOW_HOME/config folder. (Airflow adds $AIRFLOW_HOME/config on PYTHONPATH when Airflow is initialized)
Add the following contents to airflow_local_settings.py file. Change the colors to whatever you would like.
STATE_COLORS = { "queued": 'darkgray', "running": '#01FF70', "success": '#2ECC40', "failed": 'firebrick', "up_for_retry": 'yellow', "up_for_reschedule": 'turquoise', "upstream_failed": 'orange', "skipped": 'darkorchid', "scheduled": 'tan', }
Restart Airflow Webserver.
See documentation here
这篇关于气流 - 更改成功/失败颜色(色盲)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!