Exemple #1
0
 def filter_context(self):
     errors_only = bool(self.request.GET.get(self.errors_only_slug, False))
     selected_tags = self.request.GET.getlist(self.slug)
     show_all = bool(not selected_tags)
     values = fast_distinct(DeviceReportEntry, 'type')
     tags = [{
         'name': value,
         'show': bool(show_all or value in selected_tags)
     } for value in values]
     context = {
         'errors_only_slug': self.errors_only_slug,
         'default_on': show_all,
         'logtags': tags,
         'errors_css_id': 'device_log_errors_only_checkbox',
         self.errors_only_slug: errors_only,
     }
     return context
Exemple #2
0
 def filter_context(self):
     errors_only = bool(self.request.GET.get(self.errors_only_slug, False))
     selected_tags = self.request.GET.getlist(self.slug)
     show_all = bool(not selected_tags)
     values = fast_distinct(DeviceReportEntry, 'type')
     tags = [{
         'name': value,
         'show': bool(show_all or value in selected_tags)
     } for value in values]
     context = {
         'errors_only_slug': self.errors_only_slug,
         'default_on': show_all,
         'logtags': tags,
         'errors_css_id': 'device_log_errors_only_checkbox',
         self.errors_only_slug: errors_only,
     }
     return context
Exemple #3
0
 def options(self):
     return [(d, d) for d in fast_distinct(DeviceReportEntry, 'domain')]
Exemple #4
0
 def options(self):
     return [(d, d) for d in fast_distinct(DeviceReportEntry, 'domain')]