You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2025/12/05 13:00:54 UTC
[PR] Fix links for DurationChart [airflow]
pierrejeambrun opened a new pull request, #59095:
URL: https://github.com/apache/airflow/pull/59095
Closes: https://github.com/apache/airflow/issues/57582
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix links for DurationChart [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun merged PR #59095:
URL: https://github.com/apache/airflow/pull/59095
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix links for DurationChart [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on code in PR #59095:
URL: https://github.com/apache/airflow/pull/59095#discussion_r2602196194
##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -191,9 +192,17 @@ export const DurationChart = ({
}
case "Task Instance": {
const entry = entries[element.index] as TaskInstanceResponse | undefined;
- const baseUrl = `/dags/${entry?.dag_id}/runs/${entry?.dag_run_id}`;
- navigate(`${baseUrl}/tasks/${entry?.task_id}`);
+ const baseUrl = buildTaskInstanceUrl({
+ currentPathname: location.pathname,
+ dagId: entry?.dag_id ?? "",
Review Comment:
Yes I was able to rewrite that in a cleaner way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix links for DurationChart [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #59095:
URL: https://github.com/apache/airflow/pull/59095#discussion_r2593119919
##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -191,9 +192,17 @@ export const DurationChart = ({
}
case "Task Instance": {
const entry = entries[element.index] as TaskInstanceResponse | undefined;
- const baseUrl = `/dags/${entry?.dag_id}/runs/${entry?.dag_run_id}`;
- navigate(`${baseUrl}/tasks/${entry?.task_id}`);
+ const baseUrl = buildTaskInstanceUrl({
+ currentPathname: location.pathname,
+ dagId: entry?.dag_id ?? "",
Review Comment:
Is it possible for dag_id, run_id, and task_id to be null?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix links for DurationChart [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #59095:
URL: https://github.com/apache/airflow/pull/59095#issuecomment-3631994017
### Backport successfully created: v3-1-test
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-1-test</td>
<td><a href="https://github.com/apache/airflow/pull/59237"><img src="https://img.shields.io/badge/PR-59237-blue" alt="PR Link"></a></td>
</tr>
</table>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix links for DurationChart [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #59095:
URL: https://github.com/apache/airflow/pull/59095#discussion_r2598892499
##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -191,9 +192,17 @@ export const DurationChart = ({
}
case "Task Instance": {
const entry = entries[element.index] as TaskInstanceResponse | undefined;
- const baseUrl = `/dags/${entry?.dag_id}/runs/${entry?.dag_run_id}`;
- navigate(`${baseUrl}/tasks/${entry?.task_id}`);
+ const baseUrl = buildTaskInstanceUrl({
+ currentPathname: location.pathname,
+ dagId: entry?.dag_id ?? "",
Review Comment:
We could add a quick check to make sure entry isn't undefined before creating the baseUrl. Then we wouldn't need these checks
##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -191,9 +192,17 @@ export const DurationChart = ({
}
case "Task Instance": {
const entry = entries[element.index] as TaskInstanceResponse | undefined;
- const baseUrl = `/dags/${entry?.dag_id}/runs/${entry?.dag_run_id}`;
- navigate(`${baseUrl}/tasks/${entry?.task_id}`);
+ const baseUrl = buildTaskInstanceUrl({
+ currentPathname: location.pathname,
+ dagId: entry?.dag_id ?? "",
Review Comment:
We could add a quick check to make sure entry isn't undefined before creating the baseUrl. Then we wouldn't need so many conditions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org