VedantMadane opened a new pull request, #60591:
URL: https://github.com/apache/airflow/pull/60591
## Summary
This PR adds a "Clear All Mapped Tasks" button to the mapped task instance
header, allowing users to clear all mapped task instances at once.
Closes #60460
## Problem
Currently, there is no way to clear all mapped task instances at once for a
specific task. Users have to clear each individual mapped task instance
separately, which is tedious when dealing with many mapped instances.
## Solution
Added a "Clear All Mapped Tasks" button to the mapped task instance header
that clears all map indices for a given task. The backend already supports this
functionality - when only the `task_id` is provided (without `map_index`), all
map indices are targeted for clearing.
## Changes
- **ClearAllMappedTaskInstancesButton.tsx**: New button component that
triggers the dialog
- **ClearAllMappedTaskInstancesDialog.tsx**: New dialog component similar to
ClearTaskInstanceDialog, but uses `task_ids: [taskId]` instead of `[[taskId,
mapIndex]]` to clear all mapped instances
- **Header.tsx**: Updated to accept `dagId` and `dagRunId` props and render
the new button
- **MappedTaskInstance.tsx**: Updated to pass `dagId` and `dagRunId` to the
Header component
- **dags.json**: Added translation keys for the new feature
## Screenshot Location
The button appears in the header of the mapped task instance page (e.g.,
`/dags/{dag_id}/runs/{run_id}/tasks/{task_id}/mapped`), next to the task name
and statistics.
## Testing
- TypeScript compilation passes
- The feature uses existing backend functionality that already supports
clearing all mapped instances
- The dialog follows the same patterns as the existing
ClearTaskInstanceDialog
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]