Default sorting on start_date DESC for TI and known events

This commit is contained in:
Maxime 2015-04-28 16:30:23 +00:00
Родитель 6b99aca589
Коммит 6fe2f19663
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1389,6 +1389,7 @@ class TaskInstanceModelView(ModelViewOnly):
end_date=datetime_f,
dag_id=dag_link, duration=duration_f)
column_searchable_list = ('dag_id', 'task_id', 'state')
column_default_sort = ('start_date', True)
column_list = (
'dag_id', 'task_id', 'execution_date',
'start_date', 'end_date', 'duration', 'state', 'job_id', 'hostname',
@ -1400,7 +1401,6 @@ mv = TaskInstanceModelView(
admin.add_view(mv)
class ConnectionModelView(SuperUserMixin, ModelView):
column_default_sort = ('conn_id', False)
column_list = ('conn_id', 'conn_type', 'host', 'port')
@ -1607,6 +1607,7 @@ class KnowEventView(DataProfilingMixin, ModelView):
'description')
column_list = (
'label', 'event_type', 'start_date', 'end_date', 'reported_by')
column_default_sort = ("start_date", True)
mv = KnowEventView(
models.KnownEvent, Session, name="Known Events", category="Data Profiling")
admin.add_view(mv)