This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun 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 f360bc8024b Link to latest dagrun in Dag header. (#51119)
f360bc8024b is described below
commit f360bc8024b730062f463da310c2af27656b62b6
Author: Karthikeyan Singaravelan <[email protected]>
AuthorDate: Wed May 28 16:47:28 2025 +0530
Link to latest dagrun in Dag header. (#51119)
---
.../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 c2e5fec62a0..18a1b49f18a 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";
@@ -54,13 +55,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,
},
{