Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename execution date in forms and tables #19063

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -3231,6 +3231,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 @@ -3267,6 +3272,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 @@ -3943,6 +3952,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 @@ -4087,6 +4099,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 @@ -4130,7 +4146,7 @@ class TaskRescheduleModelView(AirflowModelView):
]

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

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

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

search_columns = [
Expand Down