You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/25 22:54:39 UTC

[GitHub] [airflow] kaxil opened a new pull request #9520: Config states

kaxil opened a new pull request #9520:
URL: https://github.com/apache/airflow/pull/9520


   closes https://github.com/apache/airflow/issues/7843
   
   **Stock Screenshots**:
   
   ![image](https://user-images.githubusercontent.com/8811558/85801797-8d4feb80-b73b-11ea-93fb-30e22cf9f0d1.png)
   
   ![image](https://user-images.githubusercontent.com/8811558/85801824-993bad80-b73b-11ea-8364-4af79cebae8f.png)
   ![image](https://user-images.githubusercontent.com/8811558/85801856-a8baf680-b73b-11ea-8212-240c4318ff1d.png)
   ![image](https://user-images.githubusercontent.com/8811558/85801867-ae184100-b73b-11ea-977a-12953aac8473.png)
   ![image](https://user-images.githubusercontent.com/8811558/85801884-b4a6b880-b73b-11ea-8465-48ea4e5a6ef7.png)
   ![image](https://user-images.githubusercontent.com/8811558/85801905-bc665d00-b73b-11ea-8e47-4512a7d2730c.png)
   
   
   **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:
   
   ```python
   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](https://user-images.githubusercontent.com/8811558/85803015-23851100-b73e-11ea-9e01-3a0b3461b218.png)
   ![image](https://user-images.githubusercontent.com/8811558/85803077-4e6f6500-b73e-11ea-8af7-23399061733a.png)
   ![image](https://user-images.githubusercontent.com/8811558/85803327-ca69ad00-b73e-11ea-934f-fd5a6fd383c9.png)
   ![image](https://user-images.githubusercontent.com/8811558/85803350-d7869c00-b73e-11ea-8965-2ba16b4cb297.png)
   ![image](https://user-images.githubusercontent.com/8811558/85803374-e5d4b800-b73e-11ea-8b6c-c0a70c044c90.png)
   
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Target Github ISSUE in description if exists
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#discussion_r446939976



##########
File path: airflow/www/views.py
##########
@@ -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)

Review comment:
       Updated




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Acehaidrey commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
Acehaidrey commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-650946387


   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.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-650781173


   > 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)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-651158525


   Rebased on latest master


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil merged pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #9520:
URL: https://github.com/apache/airflow/pull/9520


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Acehaidrey commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
Acehaidrey commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-650023547


   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.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-651158553


   Happy with this now @kaxil?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-651161345


   > Happy with this now @kaxil?
   
   Yup


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] preston-m-price commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
preston-m-price commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-651204131


   Thanks for this change!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#discussion_r446894928



##########
File path: airflow/www/views.py
##########
@@ -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)

Review comment:
       Isn't this already done from https://github.com/apache/airflow/pull/9520/files#diff-e198cdb4d2a7b4801616a067e6cbd82eR80




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#issuecomment-649865956


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #9520: Allow changing Task States Colors

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9520:
URL: https://github.com/apache/airflow/pull/9520#discussion_r446940597



##########
File path: airflow/www/views.py
##########
@@ -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)

Review comment:
       in https://github.com/apache/airflow/pull/9520/commits/f9601c21dade06bd737af95ed09c5bd946c3b722




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org