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

[AIRFLOW-6268] Prevent ajax calls when no dags present #6839

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

robinedwards
Copy link
Contributor

Jira

Description

  • Here are some details about my PR, including screenshots of any UI changes:

When searching for DAGs in the UI and no results are returned four AJAX requests are still issued (dag_stats, task_stasks, blocked and last_dagruns) which return the state of the entire the system.

This small changes prevents the AJAX requests being issued when there are no DAGs on the page.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

N/A no unit tests for frontend code at present. Tested locally.

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • [] In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

N/A

Prevent 4 AJAX calls on empty search result page of DAGs view.
@@ -53,13 +53,13 @@ <h2>DAGs</h2>
<th>Owner</th>
<th style="padding-left: 5px;">Recent Tasks
<span id="statuses_info" class="glyphicon glyphicon-info-sign" aria-hidden="true" title="Status of tasks from all active DAG runs or, if not currently active, from most recent run."></span>
<img id="loading" width="15" src="{{ url_for("static", filename="loading.gif") }}">
Copy link
Member

Choose a reason for hiding this comment

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

Lol duplicate id!

@ashb ashb merged commit 5abe8bd into apache:master Dec 18, 2019
ashb pushed a commit to ashb/airflow that referenced this pull request Dec 18, 2019
Prevent 4 AJAX calls on empty search result page of DAGs view.

(cherry picked from commit 5abe8bd)
ashb pushed a commit that referenced this pull request Dec 18, 2019
Prevent 4 AJAX calls on empty search result page of DAGs view.

(cherry picked from commit 5abe8bd)
ashb pushed a commit that referenced this pull request Dec 19, 2019
Prevent 4 AJAX calls on empty search result page of DAGs view.

(cherry picked from commit 5abe8bd)
kaxil pushed a commit that referenced this pull request Dec 19, 2019
Prevent 4 AJAX calls on empty search result page of DAGs view.

(cherry picked from commit 5abe8bd)
KKcorps pushed a commit to KKcorps/airflow that referenced this pull request Dec 21, 2019
Prevent 4 AJAX calls on empty search result page of DAGs view.
galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
Prevent 4 AJAX calls on empty search result page of DAGs view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants