From 58aab1118a95ef63ba00784760fd13730dd46501 Mon Sep 17 00:00:00 2001 From: Jens Scheffler <95105677+jens-scheffler-bosch@users.noreply.github.com> Date: Sun, 21 May 2023 19:15:05 +0200 Subject: [PATCH] Fix dropdown default and adjust tutorial to use 42 as default for proof (#31400) --- airflow/example_dags/example_params_ui_tutorial.py | 4 ++-- airflow/www/templates/airflow/trigger.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airflow/example_dags/example_params_ui_tutorial.py b/airflow/example_dags/example_params_ui_tutorial.py index 485817f137080..3d2ec97c9976b 100644 --- a/airflow/example_dags/example_params_ui_tutorial.py +++ b/airflow/example_dags/example_params_ui_tutorial.py @@ -65,11 +65,11 @@ ), # If you want to have a selection list box then you can use the enum feature of JSON schema "pick_one": Param( - "value 1", + "value 42", type="string", title="Select one Value", description="You can use JSON schema enum's to generate drop down selection boxes.", - enum=[f"value {i}" for i in range(1, 42)], + enum=[f"value {i}" for i in range(16, 64)], ), # Boolean as proper parameter with description "bool": Param( diff --git a/airflow/www/templates/airflow/trigger.html b/airflow/www/templates/airflow/trigger.html index f98e31b0c9b46..a7969f7cbb9da 100644 --- a/airflow/www/templates/airflow/trigger.html +++ b/airflow/www/templates/airflow/trigger.html @@ -71,10 +71,10 @@ {% elif "enum" in form_details.schema and form_details.schema.enum %} {% elif form_details.schema and "array" in form_details.schema.type %}