From c8ec1ffd92323b3dc3bd31b3fe411fa181d7dfec Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Tue, 19 Oct 2021 08:59:13 -0500 Subject: [PATCH] Rename execution date in forms and tables (#19063) (cherry picked from commit 614de56e0197d18dd9a8df1cfb76cfcbdb570fa4) --- airflow/www/forms.py | 6 +++--- airflow/www/views.py | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/airflow/www/forms.py b/airflow/www/forms.py index d7f42f413bfbd..3a07cbed9310d 100644 --- a/airflow/www/forms.py +++ b/airflow/www/forms.py @@ -90,7 +90,7 @@ def _get_default_timezone(self): class DateTimeForm(FlaskForm): """Date filter form needed for task views""" - execution_date = DateTimeWithTimezoneField("Execution date", widget=AirflowDateTimePickerWidget()) + execution_date = DateTimeWithTimezoneField("Logical date", widget=AirflowDateTimePickerWidget()) class DateTimeWithNumRunsForm(FlaskForm): @@ -133,7 +133,7 @@ class DagRunEditForm(DynamicForm): run_id = StringField(lazy_gettext('Run Id'), widget=BS3TextFieldROWidget()) state = StringField(lazy_gettext('State'), widget=BS3TextFieldROWidget()) execution_date = DateTimeWithTimezoneField( - lazy_gettext('Execution Date'), + lazy_gettext('Logical Date'), widget=AirflowDateTimePickerROWidget(), ) conf = TextAreaField(lazy_gettext('Conf'), widget=BS3TextAreaROWidget()) @@ -167,7 +167,7 @@ class TaskInstanceEditForm(DynamicForm): validators=[InputRequired()], ) execution_date = DateTimeWithTimezoneField( - lazy_gettext('Execution Date'), + lazy_gettext('Logical Date'), widget=AirflowDateTimePickerROWidget(), validators=[InputRequired()], ) diff --git a/airflow/www/views.py b/airflow/www/views.py index 82ab2e216c887..67a96d551efb0 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -3237,6 +3237,11 @@ class SlaMissModelView(AirflowModelView): ] list_columns = ['dag_id', 'task_id', 'execution_date', 'email_sent', 'timestamp'] + + label_columns = { + 'execution_date': 'Logical Date', + } + add_columns = ['dag_id', 'task_id', 'execution_date', 'email_sent', 'timestamp'] edit_columns = ['dag_id', 'task_id', 'execution_date', 'email_sent', 'timestamp'] search_columns = ['dag_id', 'task_id', 'email_sent', 'timestamp', 'execution_date'] @@ -3273,6 +3278,10 @@ class XComModelView(AirflowModelView): permissions.ACTION_CAN_ACCESS_MENU, ] + label_columns = { + 'execution_date': 'Logical Date', + } + search_columns = ['key', 'value', 'timestamp', 'execution_date', 'task_id', 'dag_id'] list_columns = ['key', 'value', 'timestamp', 'execution_date', 'task_id', 'dag_id'] base_order = ('execution_date', 'desc') @@ -3928,6 +3937,9 @@ class DagRunModelView(AirflowPrivilegeVerifierModelView): 'end_date', 'external_trigger', ] + label_columns = { + 'execution_date': 'Logical Date', + } edit_columns = ['state', 'dag_id', 'execution_date', 'start_date', 'end_date', 'run_id', 'conf'] base_order = ('execution_date', 'desc') @@ -4072,6 +4084,10 @@ class LogModelView(AirflowModelView): list_columns = ['id', 'dttm', 'dag_id', 'task_id', 'event', 'execution_date', 'owner', 'extra'] search_columns = ['dag_id', 'task_id', 'event', 'execution_date', 'owner', 'extra'] + label_columns = { + 'execution_date': 'Logical Date', + } + base_order = ('dttm', 'desc') base_filters = [['dag_id', DagFilter, lambda: []]] @@ -4115,7 +4131,7 @@ class TaskRescheduleModelView(AirflowModelView): ] label_columns = { - 'dag_run.execution_date': 'Execution Date', + 'dag_run.execution_date': 'Logical Date', } search_columns = [ @@ -4246,7 +4262,7 @@ class TaskInstanceModelView(AirflowPrivilegeVerifierModelView): ] label_columns = { - 'dag_run.execution_date': 'Execution Date', + 'dag_run.execution_date': 'Logical Date', } search_columns = [