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

bbovenzi pushed a commit to branch hide-mapped-task-nav
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit b322566240549e9b97e39692d0edfd8e1490dbdf
Author: Brent Bovenzi <[email protected]>
AuthorDate: Tue Apr 19 15:37:55 2022 -0400

    Hide details button for mapped summaries
    
    Instead of checking `is_mapped` we just shouldn't direct to the mapped task 
details page at all.
---
 airflow/www/static/js/dag.js                       |  2 ++
 .../js/tree/details/content/taskInstance/Nav.jsx   |  2 +-
 airflow/www/templates/airflow/task_instance.html   | 30 ++++++++++------------
 airflow/www/views.py                               |  1 -
 4 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/airflow/www/static/js/dag.js b/airflow/www/static/js/dag.js
index 96f4a74484..ca8b7cc676 100644
--- a/airflow/www/static/js/dag.js
+++ b/airflow/www/static/js/dag.js
@@ -218,12 +218,14 @@ export function callModal({
     $('#btn_rendered').hide();
     $('#btn_xcom').hide();
     $('#btn_log').hide();
+    $('#btn_task').hide();
   } else {
     $('#task_actions').text('Task Actions');
     $('#btn_rendered').show();
     $('#btn_xcom').show();
     $('#btn_log').show();
     $('#btn_mapped').hide();
+    $('#btn_task').show();
   }
 
   $('#dag_dl_logs').hide();
diff --git a/airflow/www/static/js/tree/details/content/taskInstance/Nav.jsx 
b/airflow/www/static/js/tree/details/content/taskInstance/Nav.jsx
index 1b7062f898..9ed984e32e 100644
--- a/airflow/www/static/js/tree/details/content/taskInstance/Nav.jsx
+++ b/airflow/www/static/js/tree/details/content/taskInstance/Nav.jsx
@@ -98,7 +98,7 @@ const Nav = ({
           <LinkButton href={xcomLink}>XCom</LinkButton>
         </>
         )}
-        <LinkButton href={allInstancesLink} title="View all instances across 
all DAG runs">All Instances</LinkButton>
+        <LinkButton href={allInstancesLink} title="View all instances across 
all DAG runs">List Instances</LinkButton>
         <LinkButton href={filterUpstreamLink}>Filter Upstream</LinkButton>
       </Flex>
       <Divider mt={3} />
diff --git a/airflow/www/templates/airflow/task_instance.html 
b/airflow/www/templates/airflow/task_instance.html
index 407a87d9cd..44a764b63a 100644
--- a/airflow/www/templates/airflow/task_instance.html
+++ b/airflow/www/templates/airflow/task_instance.html
@@ -42,22 +42,20 @@
     <li><a href="{{ ti_url('Airflow.task') }}">
         <span class="material-icons" aria-hidden="true">details</span>
       Task Instance Details</a></li>
-    {% if is_mapped == false %}
-      <li><a href="{{ ti_url('Airflow.rendered_templates') }}">
-          <span class="material-icons" aria-hidden="true">code</span>
-        Rendered Template</a></li>
-      {% if k8s_or_k8scelery_executor %}
-        <li><a href="{{ ti_url('Airflow.rendered_k8s') }}">
-          {{ icon('kubernetes') }}
-          K8s Pod Spec</a></li>
-      {% endif %}
-      <li><a href="{{ ti_url('Airflow.log') }}">
-          <span class="material-icons" aria-hidden="true">reorder</span>
-        Log</a></li>
-      <li><a href="{{ ti_url('Airflow.xcom') }}">
-          <span class="material-icons" aria-hidden="true">sync_alt</span>
-        XCom</a></li>
-      {% endif %}
+    <li><a href="{{ ti_url('Airflow.rendered_templates') }}">
+        <span class="material-icons" aria-hidden="true">code</span>
+      Rendered Template</a></li>
+    {% if k8s_or_k8scelery_executor %}
+      <li><a href="{{ ti_url('Airflow.rendered_k8s') }}">
+        {{ icon('kubernetes') }}
+        K8s Pod Spec</a></li>
+    {% endif %}
+    <li><a href="{{ ti_url('Airflow.log') }}">
+        <span class="material-icons" aria-hidden="true">reorder</span>
+      Log</a></li>
+    <li><a href="{{ ti_url('Airflow.xcom') }}">
+        <span class="material-icons" aria-hidden="true">sync_alt</span>
+      XCom</a></li>
   </ul>
   <br>
 {% endblock %}
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 11c421d62d..de672a0416 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -1674,7 +1674,6 @@ class Airflow(AirflowBaseView):
             root=root,
             dag=dag,
             title=title,
-            is_mapped=task.is_mapped,
         )
 
     @expose('/xcom')

Reply via email to