ryanahamilton opened a new pull request #8106: [AIRFLOW-7049] Persistent 
display/filtering of DAG status
URL: https://github.com/apache/airflow/pull/8106
 
 
   Seeks to resolve 
[[AIRFLOW-7049]](https://issues.apache.org/jira/browse/AIRFLOW-7049) by 
replacing the problematic "show/hide paused DAGs" toggle with a more robust 
status filter that saves and persists the user's selection.
   
   Status Filter:
   
   
![image](https://user-images.githubusercontent.com/3267/78398505-2d74f900-75c1-11ea-8258-20f357917ded.png)
   
   In context of the DAGs (home) view:
   
   
![image](https://user-images.githubusercontent.com/3267/78398608-6319e200-75c1-11ea-9a42-d3d801c2345d.png)
   
   Status logic:
   
   - The status filter is set to "all" by default. If the preexisting webserver 
variable `hide_paused_dags_by_default` is set to `True`, the default is 
"active".
   - The currently selected status will always be saved in 
`flask_session[FILTER_STATUS_COOKIE]`. Value of `all`, `active`, or `paused`.
   - A status param in the URL will always override and resave the cookie 
value. e.g. `/home?status=active`
   - If a user leaves the page and returns to `/home`, the last saved cookie 
value will be selected.
   
   Of note:
   
   - The status filter buttons include a number count correlating to the number 
of DAGs for each.
   - Status params are passed along within the pagination links
   - The `dags.html` diff is so large because I fixed a bunch of indentation 
while I was in there.
   
   Tests:
   
   - Added a view test to confirm URL parameter values are saving to cookie 
value.
   
   ---
   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 ] 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:
[email protected]


With regards,
Apache Git Services

Reply via email to