You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2024/02/20 12:25:58 UTC

(airflow) 02/27: Use execution_date= param as a backup to base date for grid view (#37018)

This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 28852bde38b76988d8298a71ad0214affc32633c
Author: Brent Bovenzi <br...@astronomer.io>
AuthorDate: Fri Jan 26 14:52:06 2024 -0500

    Use execution_date= param as a backup to base date for grid view (#37018)
    
    (cherry picked from commit fee7e33983a0c3f9eeb1f72469d8a68fbb81fa6c)
---
 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 2d5d2eb321..1df1261a16 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();