未验证 提交 9615f1f4 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #2253 from wanjunlei/auditing

fix wrong total audit event number
......@@ -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.
先完成此消息的编辑!
想要评论请 注册