Skip to content

Commit

Permalink
[AIRFLOW-4294] Fix missing dag & task runs in UI dag_id contains a dot (
Browse files Browse the repository at this point in the history
apache#5111)

We used to key on `safe_dag_id` but in that got changed in apache#4368 to use a 
more efficient query, which broke for non-sub-DAGs that contain a `.` in their id.

Arguably this escaping is a front-end concern anyway, so handling the escaping in the front end makes sense anyway.
  • Loading branch information
yourhiro authored and amichai07 committed Apr 22, 2019
1 parent 16d93c9 commit 3a82e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/www/templates/airflow/dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ <h2>DAGs</h2>
d3.json("{{ url_for('airflow.dag_stats') }}", function(error, json) {
for(var dag_id in json) {
states = json[dag_id];
g = d3.select('svg#dag-run-' + dag_id)
g = d3.select('svg#dag-run-' + dag_id.replace(/\./g, '__dot__'))
.attr('height', diameter + (stroke_width_hover * 2))
.attr('width', '110px')
.selectAll("g")
Expand Down Expand Up @@ -391,7 +391,7 @@ <h2>DAGs</h2>
d3.json("{{ url_for('airflow.task_stats') }}", function(error, json) {
for(var dag_id in json) {
states = json[dag_id];
g = d3.select('svg#task-run-' + dag_id)
g = d3.select('svg#task-run-' + dag_id.replace(/\./g, '__dot__'))
.attr('height', diameter + (stroke_width_hover * 2))
.attr('width', '300px')
.selectAll("g")
Expand Down

0 comments on commit 3a82e48

Please sign in to comment.