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

pierrejeambrun pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new 1fc41dd2fb4 [v3-0-test] Link to latest dagrun in Dag header. (#51119) 
(#51148)
1fc41dd2fb4 is described below

commit 1fc41dd2fb42adfeb130ee9f7e463dc1c3c6db57
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed May 28 15:32:03 2025 +0200

    [v3-0-test] Link to latest dagrun in Dag header. (#51119) (#51148)
    
    (cherry picked from commit f360bc8024b730062f463da310c2af27656b62b6)
    
    Co-authored-by: Karthikeyan Singaravelan <[email protected]>
---
 .../src/airflow/ui/src/pages/Dag/Header.tsx         | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx 
b/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
index 94874dd8aea..8de3a012271 100644
--- a/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx
@@ -16,8 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import { Link } from "@chakra-ui/react";
 import { FiBookOpen } from "react-icons/fi";
-import { useParams } from "react-router-dom";
+import { useParams, Link as RouterLink } from "react-router-dom";
 
 import type { DAGDetailsResponse, DAGWithLatestDagRunsResponse } from 
"openapi/requests/types.gen";
 import { DagIcon } from "src/assets/DagIcon";
@@ -53,13 +54,17 @@ export const Header = ({
       label: "Latest Run",
       value:
         Boolean(latestRun) && latestRun !== undefined ? (
-          <DagRunInfo
-            endDate={latestRun.end_date}
-            logicalDate={latestRun.logical_date}
-            runAfter={latestRun.run_after}
-            startDate={latestRun.start_date}
-            state={latestRun.state}
-          />
+          <Link asChild color="fg.info">
+            <RouterLink 
to={`/dags/${latestRun.dag_id}/runs/${latestRun.dag_run_id}`}>
+              <DagRunInfo
+                endDate={latestRun.end_date}
+                logicalDate={latestRun.logical_date}
+                runAfter={latestRun.run_after}
+                startDate={latestRun.start_date}
+                state={latestRun.state}
+              />
+            </RouterLink>
+          </Link>
         ) : undefined,
     },
     {

Reply via email to