bbovenzi commented on code in PR #70079:
URL: https://github.com/apache/airflow/pull/70079#discussion_r3622948258
##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -237,6 +243,34 @@ const TriggerDAGForm = ({
<Spacer />
</>
) : undefined}
+ {recentDagRuns?.dag_runs?.length ? (
+ <Field.Root orientation="horizontal">
+ <Field.Label
fontSize="md">{translate("components:triggerDag.recentConfigurations")}</Field.Label>
+
+ <select
Review Comment:
Why are we using the native select while the rest of this form are Chakra
controls? This select won't have the same styling.
##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -237,6 +243,34 @@ const TriggerDAGForm = ({
<Spacer />
</>
) : undefined}
+ {recentDagRuns?.dag_runs?.length ? (
+ <Field.Root orientation="horizontal">
+ <Field.Label
fontSize="md">{translate("components:triggerDag.recentConfigurations")}</Field.Label>
+
+ <select
+ onChange={(event) => {
+ const selectedRun = recentDagRuns.dag_runs.find(
+ (run) => run.dag_run_id === event.target.value,
+ );
+
+ if (selectedRun?.conf) {
+ const config = JSON.stringify(selectedRun.conf, undefined,
2);
+
+ setConf(config);
+ setValue("conf", config);
+ }
+ }}
+ >
+ <option
value="">{translate("components:triggerDag.selectRecentConfiguration")}</option>
Review Comment:
This translation key doesn't exist. We need to add it.
--
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]