Skip to content

Commit 0c703ff

Browse files
[v3-0-test] Always show backfill button but enable it only on dags with schedule. (#50969) (#50970)
(cherry picked from commit f8c8200) Co-authored-by: Karthikeyan Singaravelan <[email protected]>
1 parent f3c4520 commit 0c703ff

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGModal.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Heading, VStack, HStack, Spinner, Center, Text } from "@chakra-ui/react
2020
import React, { useState } from "react";
2121

2222
import { useDagServiceGetDag } from "openapi/queries";
23-
import { Dialog } from "src/components/ui";
23+
import { Dialog, Tooltip } from "src/components/ui";
2424
import { RadioCardItem, RadioCardRoot } from "src/components/ui/RadioCard";
2525

2626
import RunBackfillForm from "../DagActions/RunBackfillForm";
@@ -90,7 +90,7 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
9090
</Center>
9191
) : (
9292
<>
93-
{dag && hasSchedule ? (
93+
{dag ? (
9494
<RadioCardRoot
9595
my={4}
9696
onChange={(event) => {
@@ -104,11 +104,14 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
104104
label="Single Run"
105105
value={RunMode.SINGLE}
106106
/>
107-
<RadioCardItem
108-
description="Run this DAG for a range of dates"
109-
label="Backfill"
110-
value={RunMode.BACKFILL}
111-
/>
107+
<Tooltip content="Backfill requires a schedule" disabled={hasSchedule}>
108+
<RadioCardItem
109+
description="Run this DAG for a range of dates"
110+
disabled={!hasSchedule}
111+
label="Backfill"
112+
value={RunMode.BACKFILL}
113+
/>
114+
</Tooltip>
112115
</HStack>
113116
</RadioCardRoot>
114117
) : undefined}

0 commit comments

Comments
 (0)