fix bug total result of auditing time topology error
This commit is contained in:
@@ -123,7 +123,7 @@ func (es *Elasticsearch) CountOverTime(filter *auditing.Filter, interval string)
|
|||||||
if err := json.Unmarshal(raw, &agg); err != nil {
|
if err := json.Unmarshal(raw, &agg); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
histo := auditing.Histogram{Total: int64(len(agg.Buckets))}
|
histo := auditing.Histogram{Total: resp.Hits.Total}
|
||||||
for _, b := range agg.Buckets {
|
for _, b := range agg.Buckets {
|
||||||
histo.Buckets = append(histo.Buckets,
|
histo.Buckets = append(histo.Buckets,
|
||||||
auditing.Bucket{Time: b.Key, Count: b.DocCount})
|
auditing.Bucket{Time: b.Key, Count: b.DocCount})
|
||||||
|
|||||||
Reference in New Issue
Block a user