bbovenzi commented on a change in pull request #18244:
URL: https://github.com/apache/airflow/pull/18244#discussion_r708957311
##########
File path: airflow/www/templates/airflow/task.html
##########
@@ -43,18 +43,22 @@ <h5>Dependencies Blocking Task From Getting Scheduled</h5>
<h5>Attribute: {{ attr }}</h5>
{{ value }}
{% endfor %}
- <h5>Task Instance Attributes</h5>
- <table class="table table-striped table-bordered">
- <tr>
- <th>Attribute</th>
- <th>Value</th>
- </tr>
- {% for attr, value in ti_attrs %}
+ {% if ti_attrs is none %}
+ <h5>No Task Instance Available</h5>
+ {% else %}
+ <h5>Task Instance Attributes</h5>
+ <table class="table table-striped table-bordered">
<tr>
- <td>{{ attr }}</td>
- <td class="code js-ti-attr">{{ value }}</td>
+ <th>Attribute</th>
+ <th>Value</th>
</tr>
- {% endfor %}
+ {% for attr, value in ti_attrs %}
+ <tr>
+ <td>{{ attr }}</td>
+ <td class="code js-ti-attr">{{ value }}</td>
+ </tr>
+ {% endfor %}
+ {% endif %}
Review comment:
```suggestion
</table>
{% endif %}
```
We should keep the whole table inside the if-else block
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]