Skip to content

Commit b01ebf2

Browse files
tirkarthidadonnelly316
authored andcommitted
Always show backfill button but enable it only on dags with schedule. (apache#50969)
1 parent 8d7b414 commit b01ebf2

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";
@@ -93,7 +93,7 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
9393
</Center>
9494
) : (
9595
<>
96-
{dag && hasSchedule ? (
96+
{dag ? (
9797
<RadioCardRoot
9898
my={4}
9999
onChange={(event) => {
@@ -107,11 +107,14 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
107107
label="Single Run"
108108
value={RunMode.SINGLE}
109109
/>
110-
<RadioCardItem
111-
description="Run this DAG for a range of dates"
112-
label="Backfill"
113-
value={RunMode.BACKFILL}
114-
/>
110+
<Tooltip content="Backfill requires a schedule" disabled={hasSchedule}>
111+
<RadioCardItem
112+
description="Run this DAG for a range of dates"
113+
disabled={!hasSchedule}
114+
label="Backfill"
115+
value={RunMode.BACKFILL}
116+
/>
117+
</Tooltip>
115118
</HStack>
116119
</RadioCardRoot>
117120
) : undefined}

0 commit comments

Comments
 (0)