def _histo_data(domain_list, histogram_type, start_date, end_date, interval, filters): return dict( [ ( d["display_name"], es_histogram(histogram_type, d["names"], start_date, end_date, interval=interval, filters=filters), ) for d in domain_list ] )
def _histo_data(domain_list, histogram_type, start_date, end_date, interval, filters): return dict([(d['display_name'], es_histogram( histogram_type, d["names"], start_date, end_date, interval=interval, filters=filters, )) for d in domain_list])
def es_histogram(self, workflow): q = { "query": { "bool": { "must": [{ "term": { "workflow": workflow.lower() } }] } } } return es_histogram(histo_type="sms", domains=[self.domain], q=self.add_recipients_to_query(q), startdate=self.datespan.startdate_display, enddate=self.datespan.enddate_display)
def es_histogram(self, workflow): q = {"query": {"bool": {"must": [{"term": {"workflow": workflow.lower()}}]}}} return es_histogram(histo_type="sms", domains=[self.domain], q=self.add_recipients_to_query(q), startdate=self.datespan.startdate_display, enddate=self.datespan.enddate_display)