diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index 0941637704..06ced52eb1 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -29,7 +29,9 @@ from django.core.urlresolvers import reverse | |||
29 | from django.views.generic import TemplateView | 29 | from django.views.generic import TemplateView |
30 | import itertools | 30 | import itertools |
31 | 31 | ||
32 | from toastergui.tablefilter import TableFilter, TableFilterActionToggle | 32 | from toastergui.tablefilter import TableFilter |
33 | from toastergui.tablefilter import TableFilterActionToggle | ||
34 | from toastergui.tablefilter import TableFilterActionDateRange | ||
33 | 35 | ||
34 | class ProjectFilters(object): | 36 | class ProjectFilters(object): |
35 | def __init__(self, project_layers): | 37 | def __init__(self, project_layers): |
@@ -1070,6 +1072,7 @@ class BuildsTable(ToasterTable): | |||
1070 | help_text='The date and time when the build started', | 1072 | help_text='The date and time when the build started', |
1071 | hideable=True, | 1073 | hideable=True, |
1072 | orderable=True, | 1074 | orderable=True, |
1075 | filter_name='started_on_filter', | ||
1073 | static_data_name='started_on', | 1076 | static_data_name='started_on', |
1074 | static_data_template=started_on_template) | 1077 | static_data_template=started_on_template) |
1075 | 1078 | ||
@@ -1077,6 +1080,7 @@ class BuildsTable(ToasterTable): | |||
1077 | help_text='The date and time when the build finished', | 1080 | help_text='The date and time when the build finished', |
1078 | hideable=False, | 1081 | hideable=False, |
1079 | orderable=True, | 1082 | orderable=True, |
1083 | filter_name='completed_on_filter', | ||
1080 | static_data_name='completed_on', | 1084 | static_data_name='completed_on', |
1081 | static_data_template=completed_on_template) | 1085 | static_data_template=completed_on_template) |
1082 | 1086 | ||
@@ -1149,6 +1153,38 @@ class BuildsTable(ToasterTable): | |||
1149 | outcome_filter.add_action(failed_builds_filter_action) | 1153 | outcome_filter.add_action(failed_builds_filter_action) |
1150 | self.add_filter(outcome_filter) | 1154 | self.add_filter(outcome_filter) |
1151 | 1155 | ||
1156 | # started on | ||
1157 | started_on_filter = TableFilter( | ||
1158 | 'started_on_filter', | ||
1159 | 'Filter by date when build was started' | ||
1160 | ) | ||
1161 | |||
1162 | by_started_date_range_filter_action = TableFilterActionDateRange( | ||
1163 | 'date_range', | ||
1164 | 'Build date range', | ||
1165 | 'started_on', | ||
1166 | QuerysetFilter() | ||
1167 | ) | ||
1168 | |||
1169 | started_on_filter.add_action(by_started_date_range_filter_action) | ||
1170 | self.add_filter(started_on_filter) | ||
1171 | |||
1172 | # completed on | ||
1173 | completed_on_filter = TableFilter( | ||
1174 | 'completed_on_filter', | ||
1175 | 'Filter by date when build was completed' | ||
1176 | ) | ||
1177 | |||
1178 | by_completed_date_range_filter_action = TableFilterActionDateRange( | ||
1179 | 'date_range', | ||
1180 | 'Build date range', | ||
1181 | 'completed_on', | ||
1182 | QuerysetFilter() | ||
1183 | ) | ||
1184 | |||
1185 | completed_on_filter.add_action(by_completed_date_range_filter_action) | ||
1186 | self.add_filter(completed_on_filter) | ||
1187 | |||
1152 | # failed tasks | 1188 | # failed tasks |
1153 | failed_tasks_filter = TableFilter( | 1189 | failed_tasks_filter = TableFilter( |
1154 | 'failed_tasks_filter', | 1190 | 'failed_tasks_filter', |