Phinhas214 commented on code in PR #71467:
URL: https://github.com/apache/airflow/pull/71467#discussion_r3779310724
##########
airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx:
##########
@@ -126,10 +142,38 @@ export const Backfills = () => {
const { backfillId, dagId = "" } = useParams();
const selectedBackfillId = Number(backfillId);
const hasSelectedBackfill = Number.isInteger(selectedBackfillId) &&
selectedBackfillId > 0;
+
+ const [searchParams] = useSearchParams();
+
+ const fromDateGte = searchParams.get(FROM_DATE_GTE_PARAM);
+ const fromDateLte = searchParams.get(FROM_DATE_LTE_PARAM);
+ const toDateGte = searchParams.get(TO_DATE_GTE_PARAM);
+ const toDateLte = searchParams.get(TO_DATE_LTE_PARAM);
+ const createdAtGte = searchParams.get(CREATED_AT_GTE_PARAM);
+ const createdAtLte = searchParams.get(CREATED_AT_LTE_PARAM);
+ const completedAtGte = searchParams.get(COMPLETED_AT_GTE_PARAM);
+ const completedAtLte = searchParams.get(COMPLETED_AT_LTE_PARAM);
+ const maxActiveRunsGte = searchParams.get(MAX_ACTIVE_RUNS_GTE_PARAM);
+ const maxActiveRunsLte = searchParams.get(MAX_ACTIVE_RUNS_LTE_PARAM);
+ const reprocessBehavior = searchParams.get(REPROCESS_BEHAVIOR_PARAM) as
ReprocessBehavior | undefined;
Review Comment:
Fixed this issue. I was mirroring the way DagsList.tsx (lines 257-258) and
DetailsLayout.tsx (line 135) was doing casting without any validation but yeah
this makes sense.
Maybe we can have a utility function to validate searchParam strings like
these ones (ofc it's going to have to be in another PR).
I'd be happy to work on it if you also think it's a good idea.
--
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]