This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v3-1-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 589689c87d9516b50dd82b4b0d37828bc0784c4a Author: Guan-Ming (Wesley) Chiu <[email protected]> AuthorDate: Fri Nov 21 05:32:43 2025 +0800 Add Consuming Tasks in asset header (#58060) (cherry picked from commit d2f7debe594499aa47b01470e10b1ed77d8da193) --- airflow-core/src/airflow/ui/public/i18n/locales/en/assets.json | 1 + airflow-core/src/airflow/ui/src/pages/Asset/Header.tsx | 4 ++++ .../src/airflow/ui/src/pages/AssetsList/DependencyPopover.tsx | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/en/assets.json b/airflow-core/src/airflow/ui/public/i18n/locales/en/assets.json index f9af5aa8e5d..527dfeb9e0b 100644 --- a/airflow-core/src/airflow/ui/public/i18n/locales/en/assets.json +++ b/airflow-core/src/airflow/ui/public/i18n/locales/en/assets.json @@ -1,5 +1,6 @@ { "consumingDags": "Consuming Dags", + "consumingTasks": "Consuming Tasks", "createEvent": { "button": "Create Event", "manual": { diff --git a/airflow-core/src/airflow/ui/src/pages/Asset/Header.tsx b/airflow-core/src/airflow/ui/src/pages/Asset/Header.tsx index b2268720e29..6eb0929b580 100644 --- a/airflow-core/src/airflow/ui/src/pages/Asset/Header.tsx +++ b/airflow-core/src/airflow/ui/src/pages/Asset/Header.tsx @@ -33,6 +33,10 @@ export const Header = ({ asset }: { readonly asset?: AssetResponse }) => { label: translate("producingTasks"), value: <DependencyPopover dependencies={asset?.producing_tasks ?? []} type="Task" />, }, + { + label: translate("consumingTasks"), + value: <DependencyPopover dependencies={asset?.consuming_tasks ?? []} type="Task" />, + }, { label: translate("scheduledDags"), value: <DependencyPopover dependencies={asset?.scheduled_dags ?? []} type="Dag" />, diff --git a/airflow-core/src/airflow/ui/src/pages/AssetsList/DependencyPopover.tsx b/airflow-core/src/airflow/ui/src/pages/AssetsList/DependencyPopover.tsx index 99575c8f32a..47c538d8860 100644 --- a/airflow-core/src/airflow/ui/src/pages/AssetsList/DependencyPopover.tsx +++ b/airflow-core/src/airflow/ui/src/pages/AssetsList/DependencyPopover.tsx @@ -35,7 +35,7 @@ export const DependencyPopover = ({ dependencies, type }: Props) => { return ( // eslint-disable-next-line jsx-a11y/no-autofocus <Popover.Root autoFocus={false} lazyMount unmountOnExit> - <Popover.Trigger asChild> + <Popover.Trigger asChild disabled={dependencies.length === 0}> <Button size="sm" variant="outline"> {dependencies.length} {translate(dependencyKey, { count: dependencies.length })} </Button>
