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 2022/03/01 17:10:41 UTC

[GitHub] [airflow] bbovenzi opened a new pull request #21904: Pause auto-refresh when page is hidden

bbovenzi opened a new pull request #21904:
URL: https://github.com/apache/airflow/pull/21904


   This PR adds an event listener for the grid and graph views to pause auto-refresh when the tab or browser is no longer active. When the page is refocused, auto-refresh will turn on if there are still pending tasks.
   Also, I decided to pass the dagRun data to each table row via props instead of hooks cause it was causing extraneous rerenders.
   
   Closes: #21302
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   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/main/UPDATING.md).
   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] bbovenzi commented on pull request #21904: Pause auto-refresh when page is hidden

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


   - Simplified the event listener in graph view.
   - Now using `react-query` for the grid view to make that hook work more efficiently and set the grid view up for more API calls in later PRs


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] bbovenzi merged pull request #21904: Pause auto-refresh when page is hidden

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


   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] ashb commented on a change in pull request #21904: Pause auto-refresh when page is hidden

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



##########
File path: airflow/www/static/js/utils.js
##########
@@ -41,3 +41,23 @@ export const finalStatesMap = () => new Map([
   ['skipped', 0],
   ['no_status', 0],
 ]);
+
+// Get hidden and visibility strings depending on browser
+export const getVisibilityVars = () => {
+  let hidden;
+  let visibilityChange;
+  if (typeof document.hidden !== 'undefined') { // Opera 12.10 and Firefox 18 and later support

Review comment:
       What browsers do we actually need this conditional for? Opera 12 and FF 18 are Oooold.




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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] github-actions[bot] commented on pull request #21904: Pause auto-refresh when page is hidden

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #21904:
URL: https://github.com/apache/airflow/pull/21904#issuecomment-1061937013


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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