You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/04/03 20:26:00 UTC

[jira] [Commented] (AIRFLOW-7049) Make show_paused persistent across navigation

    [ https://issues.apache.org/jira/browse/AIRFLOW-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17074879#comment-17074879 ] 

ASF GitHub Bot commented on AIRFLOW-7049:
-----------------------------------------

ryanahamilton commented on 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:
users@infra.apache.org


> Make show_paused persistent across navigation
> ---------------------------------------------
>
>                 Key: AIRFLOW-7049
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-7049
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: webserver
>    Affects Versions: 1.10.9
>            Reporter: Ash Berlin-Taylor
>            Priority: Minor
>              Labels: gsoc
>
> The "Show/hide paused DAGs" toggle controls the setting for a page, but if you navigate to a different page and then click on the "home" link the setting will be lost.
> We should persist this on a per-user setting.
> A cookie might work for this -- we could also possibly store the "current" value in the session.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)