This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f2f6099c5a Don't display empty rendered attrs in Task Instance Details 
page (#29545)
f2f6099c5a is described below

commit f2f6099c5a2f3613dce0cc434a95a9479d748cf5
Author: Josh Fell <[email protected]>
AuthorDate: Thu Feb 16 09:17:49 2023 -0500

    Don't display empty rendered attrs in Task Instance Details page (#29545)
    
    Closes: #29515
    
    The Task Instance Details page was displaying attributes which did not have 
a value. Mainly these were the docs attributes (i.e. `doc`, `doc_json`, 
`doc_md`, `doc_rst`, and `doc_yaml`). This clutters the page with less useful 
information for the task instance.
    
    This PR changes the attributes displayed on the page only if they have 
non-empty values generally.
---
 airflow/www/templates/airflow/task.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/airflow/www/templates/airflow/task.html 
b/airflow/www/templates/airflow/task.html
index 497fbb01f4..95edfeb77e 100644
--- a/airflow/www/templates/airflow/task.html
+++ b/airflow/www/templates/airflow/task.html
@@ -40,8 +40,10 @@
   </table>
   <div>
     {% for attr, value in special_attrs_rendered.items() %}
-      <h5>Attribute: {{ attr }}</h5>
-      {{ value }}
+      {% if value %}
+        <h5>Attribute: {{ attr }}</h5>
+        {{ value }}
+      {% endif %}
     {% endfor %}
     {% if ti_attrs is none %}
       <h5>No Task Instance Available</h5>

Reply via email to