guan404ming commented on code in PR #49490:
URL: https://github.com/apache/airflow/pull/49490#discussion_r2052301170


##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGModal.tsx:
##########
@@ -37,22 +45,62 @@ const TriggerDAGModal: React.FC<TriggerDAGModalProps> = ({
   isPaused,
   onClose,
   open,
-}) => (
-  <Dialog.Root lazyMount onOpenChange={onClose} open={open} size="xl" 
unmountOnExit>
-    <Dialog.Content backdrop>
-      <Dialog.Header paddingBottom={0}>
-        <VStack align="start" gap={4}>
-          <Heading size="xl">Trigger Dag - {dagDisplayName}</Heading>
-        </VStack>
-      </Dialog.Header>
-
-      <Dialog.CloseTrigger />
-
-      <Dialog.Body>
-        <TriggerDAGForm dagId={dagId} isPaused={isPaused} onClose={onClose} 
open={open} />
-      </Dialog.Body>
-    </Dialog.Content>
-  </Dialog.Root>
-);
+}) => {
+  const [runMode, setRunMode] = useState<RunMode>(RunMode.SINGLE);
+  const { data: dag } = useDagServiceGetDag(
+    {
+      dagId,
+    },
+    undefined,
+    {
+      enabled: open && runMode === RunMode.BACKFILL,
+    },
+  );
+
+  return (
+    <Dialog.Root lazyMount onOpenChange={onClose} open={open} size="xl" 
unmountOnExit>
+      <Dialog.Content backdrop>
+        <Dialog.Header paddingBottom={0}>
+          <VStack align="start" gap={2} width="100%">
+            <Heading size="xl">
+              {runMode === RunMode.SINGLE ? "Trigger DAG" : "Run Backfill"} - 
{dagDisplayName}
+            </Heading>
+          </VStack>
+        </Dialog.Header>
+
+        <Dialog.CloseTrigger />
+
+        <Dialog.Body>
+          <RadioCardRoot
+            my={4}
+            onChange={(event) => {
+              setRunMode((event.target as HTMLInputElement).value as RunMode);
+            }}
+            value={runMode}
+          >
+            <HStack align="stretch">

Review Comment:
   Thanks for reviewing~
   Sure, I've updated, please take another look.



-- 
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]

Reply via email to