mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Querylogs older_than doesn't work with most values #3457
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#3457
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aperullo on GitHub (Feb 5, 2022).
Issue Details
When using the
/control/querylogendpoint of Adguard Home API, theolder_thanparameter doesn't work unless the timestamp passed to it is one that exists on a record in the querylogs.In my case, going to the following in my browser returns query logs as expected, because this timestamp is in my instance.
http://<adguard_addr>/control/querylog?search=&response_status=all&older_than=2022-02-02T03:25:57.195605ZSo there is logs from the 2nd. But If I change the timestamp to the 3rd like below.
`http://<adguard_addr>/control/querylog?search=&response_status=all&older_than=2022-03-02T03:25:57.195605Z``
I receive no data back even though there is definitely logs older than that.
Likewise I cannot search for most timestamps since they don't appear in the querylogs.
Expected Behavior
The api should return records older than any given timestamp, regardless of whether it is in an entry the querylogs.
Additional information
This bug doesn't happen with any date that is in the future. For a time stamp such as
2100-01-01T00:00:00.000000Zor even2023-01-01T00:00:00.000000Z, the endpoint works as expected. It seems to only occur with a timestamp in the past, that also isn't in the querylogs@ainar-g commented on GitHub (Feb 7, 2022):
Hello. The current query log API is really only designed to work with an infinite-scroll type UIs. That is, load the first page, take the last record, load the next set, repeat.
We're rewriting the API in v0.108 to make it possible to do all kinds of filtering. The issue about that is #481, and I'm going to merge this issue into that one, if you don't mind.