From fee7e33983a0c3f9eeb1f72469d8a68fbb81fa6c Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Fri, 26 Jan 2024 14:52:06 -0500 Subject: [PATCH] Use execution_date= param as a backup to base date for grid view (#37018) --- airflow/www/static/js/dag/useFilters.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/dag/useFilters.tsx b/airflow/www/static/js/dag/useFilters.tsx index 2d5d2eb321d1d..1df1261a16dca 100644 --- a/airflow/www/static/js/dag/useFilters.tsx +++ b/airflow/www/static/js/dag/useFilters.tsx @@ -69,6 +69,7 @@ export interface FilterHookReturn extends UtilFunctions { // Params names export const BASE_DATE_PARAM = "base_date"; +export const EXECUTION_DATE_PARAM = "execution_date"; export const NUM_RUNS_PARAM = "num_runs"; export const RUN_TYPE_PARAM = "run_type"; export const RUN_STATE_PARAM = "run_state"; @@ -93,7 +94,10 @@ const useFilters = (): FilterHookReturn => { ? searchParams.get(FILTER_DOWNSTREAM_PARAM) === "true" : undefined; - const baseDate = searchParams.get(BASE_DATE_PARAM) || now; + const baseDate = + searchParams.get(BASE_DATE_PARAM) || + searchParams.get(EXECUTION_DATE_PARAM) || + now; const numRuns = searchParams.get(NUM_RUNS_PARAM) || defaultDagRunDisplayNumber.toString();