fix bug can not search auditing logs with nil namespace
Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
@@ -74,9 +74,6 @@ func (c *client) CountOverTime(filter *events.Filter, interval string) (*events.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp == nil || resp.Aggregations.DateHistogramAggregation == nil {
|
||||
return &events.Histogram{}, nil
|
||||
}
|
||||
|
||||
histo := events.Histogram{Total: c.c.GetTotalHitCount(resp.Total)}
|
||||
for _, bucket := range resp.Buckets {
|
||||
@@ -98,9 +95,6 @@ func (c *client) StatisticsOnResources(filter *events.Filter) (*events.Statistic
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp == nil || resp.Aggregations.CardinalityAggregation == nil {
|
||||
return &events.Statistics{}, nil
|
||||
}
|
||||
|
||||
return &events.Statistics{
|
||||
Resources: resp.Value,
|
||||
|
||||
Reference in New Issue
Block a user