storagenode/console: use bandwidth monthly summary (#3183)
This commit is contained in:
parent
4824ecdb8d
commit
a11619e7f3
@ -153,7 +153,7 @@ func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error
|
|||||||
return nil, SNOServiceErr.Wrap(err)
|
return nil, SNOServiceErr.Wrap(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
bandwidthUsage, err := s.bandwidthDB.Summary(ctx, time.Time{}, time.Now())
|
bandwidthUsage, err := s.bandwidthDB.MonthSummary(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, SNOServiceErr.Wrap(err)
|
return nil, SNOServiceErr.Wrap(err)
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error
|
|||||||
}
|
}
|
||||||
|
|
||||||
data.Bandwidth = BandwidthInfo{
|
data.Bandwidth = BandwidthInfo{
|
||||||
Used: bandwidthUsage.Total(),
|
Used: bandwidthUsage,
|
||||||
Available: s.allocatedBandwidth.Int64(),
|
Available: s.allocatedBandwidth.Int64(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user