mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-08-16 14:10:22 +03:00
Pull request 2164: 6712-hourly-graphs
Updates #6712. Squashed commit of the following: commit dd4c822dfea04cdedf2f3fd5ea7d492ef1c5f7d1 Merge: 73207860f28a6b9f30
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Tue Mar 12 12:38:19 2024 +0300 Merge branch 'master' into 6712-hourly-graphs commit 73207860f6428ad2c7d3afe7e2d654cfeefcffdc Merge: ca29ee8e45388ad55a
Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Thu Mar 7 16:25:49 2024 +0300 Merge branch 'master' into 6712-hourly-graphs commit ca29ee8e41bf34b7fa4d261a2c9d2a809b97f874 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Thu Mar 7 14:41:45 2024 +0300 all: upd chlog commit 9d6154aef8f0c4db24c50bee6aaedc4b98e26b3c Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Thu Mar 7 14:10:32 2024 +0300 all: hourly graphs
This commit is contained in:
parent
28a6b9f303
commit
6409011510
@ -32,12 +32,14 @@ NOTE: Add new changes BELOW THIS COMMENT.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Statistics for 7 days displayed by day on the dashboard graph ([#6712]).
|
||||
- Missing "served from cache" label on long DNS server strings ([#6740]).
|
||||
- Incorrect tracking of the system hosts file's changes ([#6711]).
|
||||
|
||||
[#5992]: https://github.com/AdguardTeam/AdGuardHome/issues/5992
|
||||
[#6610]: https://github.com/AdguardTeam/AdGuardHome/issues/6610
|
||||
[#6711]: https://github.com/AdguardTeam/AdGuardHome/issues/6711
|
||||
[#6712]: https://github.com/AdguardTeam/AdGuardHome/issues/6712
|
||||
[#6740]: https://github.com/AdguardTeam/AdGuardHome/issues/6740
|
||||
|
||||
<!--
|
||||
|
@ -55,6 +55,12 @@ const Dashboard = ({
|
||||
return t('stats_disabled_short');
|
||||
}
|
||||
|
||||
const msIn7Days = 604800000;
|
||||
|
||||
if (stats.timeUnits === TIME_UNITS.HOURS && stats.interval === msIn7Days) {
|
||||
return t('for_last_days', { count: msToDays(stats.interval) });
|
||||
}
|
||||
|
||||
return stats.timeUnits === TIME_UNITS.HOURS
|
||||
? t('for_last_hours', { count: msToHours(stats.interval) })
|
||||
: t('for_last_days', { count: msToDays(stats.interval) });
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user