all: sync with master

This commit is contained in:
Ainar Garipov
2024-01-30 18:43:51 +03:00
parent f6ad64bf69
commit b01c10b73e
196 changed files with 3190 additions and 1790 deletions

View File

@@ -484,7 +484,7 @@ func (s *StatsCtx) fillCollectedStats(data *StatsResp, units []*unitDB, curID ui
data.TimeUnits = timeUnitsHours
daysCount := size / 24
if daysCount > 7 {
if daysCount >= 7 {
size = daysCount
data.TimeUnits = timeUnitsDays
}
@@ -510,6 +510,10 @@ func (s *StatsCtx) fillCollectedStats(data *StatsResp, units []*unitDB, curID ui
// fillCollectedStatsDaily fills data with collected daily statistics. units
// must contain data for the count of days.
//
// TODO(s.chzhen): Improve collection of statistics for frontend. Dashboard
// cards should contain statistics for the whole interval without rounding to
// days.
func (s *StatsCtx) fillCollectedStatsDaily(
data *StatsResp,
units []*unitDB,