Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow changing Task States Colors #9520

Merged
merged 7 commits into from
Jun 29, 2020
Merged

Conversation

kaxil
Copy link
Member

@kaxil kaxil commented Jun 25, 2020

closes #7843

The main purpose of this PR is to allow Colorblind Friendly UI

Stock Screenshots:

image

image
image
image
image
image
image

Steps to change colors:

Create airflow_local_settings.py file and put in on PYTHONPATH. (example put that file under $AIRFLOW_HOME/config/airflow_local_settings.py with the following contents:

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',
}

Screenshots with the above changes:

image
image
image
image
image
image


Make sure to mark the boxes below before creating PR: [x]

  • Description above provides context of the change
  • Unit tests coverage for changes (not needed for documentation changes)
  • Target Github ISSUE in description if exists
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@kaxil kaxil added this to the Airflow 1.10.11 milestone Jun 25, 2020
@kaxil kaxil requested a review from ashb June 25, 2020 22:54
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jun 25, 2020
@kaxil kaxil changed the title Config states Allow changing Task States Colors Jun 25, 2020
@kaxil kaxil mentioned this pull request Jun 25, 2020
@kaxil
Copy link
Member Author

kaxil commented Jun 25, 2020

Once the PR is approved, I will add some docs on changing colors

@kaxil kaxil requested review from potiuk and dimberman June 25, 2020 23:26
@Acehaidrey
Copy link
Contributor

Hi @kaxil thanks for your work on this. Quick question from your notes I'm not seeing how to make a colorblind friendly UI here though as a user configuration. If we just have local_configuration, is the idea that we just have this configurable for the webserver for everyone. I thought it was to make it configurable at a per person level.

@kaxil
Copy link
Member Author

kaxil commented Jun 28, 2020

Hi @kaxil thanks for your work on this. Quick question from your notes I'm not seeing how to make a colorblind friendly UI here though as a user configuration. If we just have local_configuration, is the idea that we just have this configurable for the webserver for everyone. I thought it was to make it configurable at a per person level.

Hey, yes this PR won't allow per-user change. It would only allow per deployment change. I wanted to address custom colors per deployment for 1.10.11 and we can take a look at per-user change at a later stage (maybe for 2.0)

@Acehaidrey
Copy link
Contributor

I see makes sense. The colors were hardcoded up to this point and weren't customizable at all - just want to make sure that my understanding is correct.

@@ -336,6 +337,7 @@ def get_int_arg(value, default=0):

state_color_mapping = State.state_color.copy()
state_color_mapping["null"] = state_color_mapping.pop(None)
state_color_mapping.update(STATE_COLORS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in f9601c2

@kaxil
Copy link
Member Author

kaxil commented Jun 29, 2020

Rebased on latest master

@ashb
Copy link
Member

ashb commented Jun 29, 2020

Happy with this now @kaxil?

@kaxil
Copy link
Member Author

kaxil commented Jun 29, 2020

Happy with this now @kaxil?

Yup

@kaxil kaxil merged commit e1108d4 into apache:master Jun 29, 2020
@kaxil kaxil deleted the config-states branch June 29, 2020 15:12
@preston-m-price
Copy link

Thanks for this change!

kaxil added a commit that referenced this pull request Jun 29, 2020
kaxil added a commit to astronomer/airflow that referenced this pull request Jul 1, 2020
kaxil added a commit that referenced this pull request Jul 1, 2020
kaxil added a commit that referenced this pull request Jul 1, 2020
Feature was added in #9520

(cherry picked from commit 65855e5)
kaxil added a commit that referenced this pull request Jul 2, 2020
Feature was added in #9520

(cherry picked from commit 65855e5)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
Feature was added in apache#9520

(cherry picked from commit 65855e5)
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 4, 2021
Feature was added in apache/airflow#9520

(cherry picked from commit 65855e558f9b070004ba817e8cf94fd834d2a67a)

GitOrigin-RevId: 1303b858ea6b6bd545b97e6e3ec69614f69d2dd4
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 4, 2021
Feature was added in apache/airflow#9520

(cherry picked from commit 65855e558f9b070004ba817e8cf94fd834d2a67a)

GitOrigin-RevId: 1303b858ea6b6bd545b97e6e3ec69614f69d2dd4
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 9, 2021
Feature was added in apache/airflow#9520

(cherry picked from commit 65855e558f9b070004ba817e8cf94fd834d2a67a)

GitOrigin-RevId: 1303b858ea6b6bd545b97e6e3ec69614f69d2dd4
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 15, 2021
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 17, 2021
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
@eladkal eladkal mentioned this pull request Sep 20, 2021
2 tasks
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 23, 2021
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Nov 25, 2021
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Mar 9, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 3, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jun 6, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jul 8, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Aug 27, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 4, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
aglipska pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Oct 7, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Dec 7, 2022
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
leahecole pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Jan 27, 2023
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
kosteev pushed a commit to kosteev/composer-airflow-test-copybara that referenced this pull request Sep 11, 2024
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
kosteev pushed a commit to kosteev/composer-airflow-test-copybara that referenced this pull request Sep 12, 2024
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 16, 2024
Feature was added in apache/airflow#9520

GitOrigin-RevId: 65855e558f9b070004ba817e8cf94fd834d2a67a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colorblind friendly UI
4 participants