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/10/15 17:17:02 UTC
[GitHub] [airflow] rynmccrmck opened a new pull request #11553: add button in tree view + update href on call modal
rynmccrmck opened a new pull request #11553:
URL: https://github.com/apache/airflow/pull/11553
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/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/master/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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ryanahamilton commented on a change in pull request #11553: Add ability to zoom into Graph view from selection in Tree View
Posted by GitBox <gi...@apache.org>.
ryanahamilton commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r506633231
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
Review comment:
This will align the button fully to the right.
```suggestion
<span class="col-md-4 text-right">
```
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
Might make sense to utilize the graph icon in this button?
```suggestion
<a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">
<span class="material-icons" aria-hidden="true">account_tree</span>
Graph View
</a>
```

##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
The Graph view probably does make the most sense since it filters down to the single run (that initiated the modal).
----------------------------------------------------------------
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] rynmccrmck commented on a change in pull request #11553: add button in tree view + update href on call modal
Posted by GitBox <gi...@apache.org>.
rynmccrmck commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r505726954
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
Interesting, didn't know of this feature. Good call.
----------------------------------------------------------------
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 merged pull request #11553: Add ability to zoom into Graph view from selection in Tree View
Posted by GitBox <gi...@apache.org>.
ashb merged pull request #11553:
URL: https://github.com/apache/airflow/pull/11553
----------------------------------------------------------------
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] rynmccrmck commented on a change in pull request #11553: add button in tree view + update href on call modal
Posted by GitBox <gi...@apache.org>.
rynmccrmck commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r505911350
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
@turbaszek after poking around it seems that default view may not be the best option. It would change the nature of the requested button (no longer graph view) and would have unintuitive effect if default_view was 'tree'
----------------------------------------------------------------
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] turbaszek commented on a change in pull request #11553: Add ability to zoom into Graph view from selection in Tree View
Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r506625945
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
@ryanahamilton what do you think?
----------------------------------------------------------------
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] rynmccrmck commented on a change in pull request #11553: Add ability to zoom into Graph view from selection in Tree View
Posted by GitBox <gi...@apache.org>.
rynmccrmck commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r506643861
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
totally, looks great
----------------------------------------------------------------
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] turbaszek commented on a change in pull request #11553: add button in tree view + update href on call modal
Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r505713071
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -531,8 +538,13 @@ <h4 class="modal-title" id="dagModalLabel">
function call_modal_dag(dag) {
id = dag && dag.id;
execution_date = dag && dag.execution_date;
+ dag_id = dag && dag.dag_id
Review comment:
O I see, `dag.id` and `dag.dag_id`
----------------------------------------------------------------
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] turbaszek commented on a change in pull request #11553: add button in tree view + update href on call modal
Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r505725460
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -322,21 +322,28 @@ <h4 class="modal-title" id="dagModalLabel">
</h4>
</div>
<div class="modal-body">
- <form method="POST">
- <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
- <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
- <input type="hidden" name="execution_date">
- <input type="hidden" name="origin" value="{{ request.base_url }}">
- <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
- Clear
- </button>
- <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
- Mark Failed
- </button>
- <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
- Mark Success
- </button>
- </form>
+ <div class="row">
+ <span class="btn-group col-md-8">
+ <form method="POST">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
+ <input type="hidden" name="dag_id" value="{{ dag.dag_id }}">
+ <input type="hidden" name="execution_date">
+ <input type="hidden" name="origin" value="{{ request.base_url }}">
+ <button type="button" id="btn_dagrun_clear" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_clear') }}">
+ Clear
+ </button>
+ <button type="button" id="btn_dagrun_failed" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_failed') }}">
+ Mark Failed
+ </button>
+ <button type="button" id="btn_dagrun_success" class="btn btn-primary" data-action="{{ url_for('Airflow.dagrun_success') }}">
+ Mark Success
+ </button>
+ </form>
+ </span>
+ <span class="col-md-4">
+ <a id="btn_dag_graph_view" class="btn" data-base-url="{{ url_for('Airflow.graph') }}" role="button">Show Graph View</a>
Review comment:
How about using the default view instead of graph? Users may have different preferences and use different views as defaults (airflow.cfg > webserver > dag_default_view)
----------------------------------------------------------------
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] turbaszek commented on a change in pull request #11553: add button in tree view + update href on call modal
Posted by GitBox <gi...@apache.org>.
turbaszek commented on a change in pull request #11553:
URL: https://github.com/apache/airflow/pull/11553#discussion_r505712593
##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -531,8 +538,13 @@ <h4 class="modal-title" id="dagModalLabel">
function call_modal_dag(dag) {
id = dag && dag.id;
execution_date = dag && dag.execution_date;
+ dag_id = dag && dag.dag_id
Review comment:
Do we need both `id` and `dag_id`?
----------------------------------------------------------------
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