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 f1a32a4072 Pass mapIndex to LogLink component for external log systems
(#41125)
f1a32a4072 is described below
commit f1a32a4072042acf5c7341b8f3cd00e1306c6737
Author: Alex Tomic <[email protected]>
AuthorDate: Tue Jul 30 16:43:46 2024 -0400
Pass mapIndex to LogLink component for external log systems (#41125)
---
airflow/www/static/js/dag/details/taskInstance/Logs/LogLink.test.tsx | 4 +++-
airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git
a/airflow/www/static/js/dag/details/taskInstance/Logs/LogLink.test.tsx
b/airflow/www/static/js/dag/details/taskInstance/Logs/LogLink.test.tsx
index c5e43af26c..3c20df7eed 100644
--- a/airflow/www/static/js/dag/details/taskInstance/Logs/LogLink.test.tsx
+++ b/airflow/www/static/js/dag/details/taskInstance/Logs/LogLink.test.tsx
@@ -49,12 +49,14 @@ describe("Test LogLink Component.", () => {
test("External Link", () => {
const tryNumber = 1;
+ const mapIndex = 2;
const { getByText, container } = render(
<LogLink
tryNumber={tryNumber}
dagId="dummyDagId"
taskId="dummyTaskId"
executionDate="2020:01:01T01:00+00:00"
+ mapIndex={mapIndex}
/>
);
@@ -64,7 +66,7 @@ describe("Test LogLink Component.", () => {
expect(linkElement).toHaveAttribute("target", "_blank");
expect(
linkElement?.href.includes(
-
`?dag_id=dummyDagId&task_id=dummyTaskId&execution_date=2020%3A01%3A01T01%3A00%2B00%3A00&map_index=-1&try_number=${tryNumber}`
+
`?dag_id=dummyDagId&task_id=dummyTaskId&execution_date=2020%3A01%3A01T01%3A00%2B00%3A00&map_index=${mapIndex}&try_number=${tryNumber}`
)
).toBeTruthy();
});
diff --git a/airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx
b/airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx
index a9bdf743d5..2647e590d8 100644
--- a/airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx
+++ b/airflow/www/static/js/dag/details/taskInstance/Logs/index.tsx
@@ -166,6 +166,7 @@ const Logs = ({
taskId={taskId}
executionDate={executionDate}
tryNumber={tryNumber}
+ mapIndex={mapIndex}
/>
)
)}