提交 dba32a1c 编写于 作者: W wanjunlei

fix bug total result of auditing time topology error

上级 d9104758
......@@ -123,7 +123,7 @@ func (es *Elasticsearch) CountOverTime(filter *auditing.Filter, interval string)
if err := json.Unmarshal(raw, &agg); err != nil {
return nil, err
}
histo := auditing.Histogram{Total: int64(len(agg.Buckets))}
histo := auditing.Histogram{Total: resp.Hits.Total}
for _, b := range agg.Buckets {
histo.Buckets = append(histo.Buckets,
auditing.Bucket{Time: b.Key, Count: b.DocCount})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册