From a11619e7f3235292a8cfbd33f51bccb08ed41ced Mon Sep 17 00:00:00 2001 From: Yaroslav Vorobiov Date: Fri, 4 Oct 2019 09:29:25 -0600 Subject: [PATCH] storagenode/console: use bandwidth monthly summary (#3183) --- storagenode/console/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storagenode/console/service.go b/storagenode/console/service.go index 779d1574c..da3820c66 100644 --- a/storagenode/console/service.go +++ b/storagenode/console/service.go @@ -153,7 +153,7 @@ func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error return nil, SNOServiceErr.Wrap(err) } - bandwidthUsage, err := s.bandwidthDB.Summary(ctx, time.Time{}, time.Now()) + bandwidthUsage, err := s.bandwidthDB.MonthSummary(ctx) if err != nil { return nil, SNOServiceErr.Wrap(err) } @@ -164,7 +164,7 @@ func (s *Service) GetDashboardData(ctx context.Context) (_ *Dashboard, err error } data.Bandwidth = BandwidthInfo{ - Used: bandwidthUsage.Total(), + Used: bandwidthUsage, Available: s.allocatedBandwidth.Int64(), }