Skip to content

Commit

Permalink
enable trigger for pause dag
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamraj-git committed Nov 13, 2024
1 parent f97dd4a commit 0c323fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ import type { DagParams } from "./TriggerDag";

type TriggerDAGFormProps = {
dagParams: DagParams;
isPaused: boolean;
onClose: () => void;
onTrigger: (updatedDagParams: DagParams) => void;
setDagParams: React.Dispatch<React.SetStateAction<DagParams>>;
};

const TriggerDAGForm: React.FC<TriggerDAGFormProps> = ({
dagParams,
isPaused,
onTrigger,
setDagParams,
}) => {
Expand Down Expand Up @@ -221,7 +219,7 @@ const TriggerDAGForm: React.FC<TriggerDAGFormProps> = ({
<Spacer />
<Button
colorPalette="blue"
disabled={Boolean(jsonError) || isPaused}
disabled={Boolean(jsonError)}
onClick={() => void handleSubmit(onSubmit)()}
>
<FiPlay /> Trigger
Expand Down
4 changes: 2 additions & 2 deletions airflow/ui/src/components/TriggerDag/TriggerDAGModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
</Heading>
{isPaused ? (
<Alert status="warning" title="Paused DAG">
You can not trigger a paused DAG, Unpause DAG to trigger
Triggering will create a Dag run but it will not start until the
Dag is unpaused.
</Alert>
) : undefined}
</VStack>
Expand All @@ -90,7 +91,6 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
<Dialog.Body>
<TriggerDAGForm
dagParams={dagParams}
isPaused={isPaused}
onClose={onClose}
onTrigger={handleTrigger}
setDagParams={setDagParams}
Expand Down

0 comments on commit 0c323fd

Please sign in to comment.