Skip to content

Commit

Permalink
Rename execution date in forms and tables (#19063)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbovenzi authored Oct 19, 2021
1 parent 0e95b57 commit 614de56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 3 additions & 3 deletions airflow/www/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -167,7 +167,7 @@ class TaskInstanceEditForm(DynamicForm):
validators=[InputRequired()],
)
execution_date = DateTimeWithTimezoneField(
lazy_gettext('Execution Date'),
lazy_gettext('Logical Date'),
widget=AirflowDateTimePickerROWidget(),
validators=[InputRequired()],
)
Expand Down
20 changes: 18 additions & 2 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,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']
Expand Down Expand Up @@ -3266,6 +3271,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')
Expand Down Expand Up @@ -3942,6 +3951,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')
Expand Down Expand Up @@ -4080,6 +4092,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: []]]
Expand Down Expand Up @@ -4123,7 +4139,7 @@ class TaskRescheduleModelView(AirflowModelView):
]

label_columns = {
'dag_run.execution_date': 'Execution Date',
'dag_run.execution_date': 'Logical Date',
}

search_columns = [
Expand Down Expand Up @@ -4254,7 +4270,7 @@ class TaskInstanceModelView(AirflowPrivilegeVerifierModelView):
]

label_columns = {
'dag_run.execution_date': 'Execution Date',
'dag_run.execution_date': 'Logical Date',
}

search_columns = [
Expand Down

0 comments on commit 614de56

Please sign in to comment.