-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Query Log suggestions #2001
base: development-v6
Are you sure you want to change the base?
Conversation
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
ENV CI_ARCH ${CI_ARCH} | ||
ENV CI_ARCH=${CI_ARCH} | ||
ARG GIT_BRANCH="test" | ||
ENV GIT_BRANCH ${GIT_BRANCH} | ||
ENV GIT_BRANCH=${GIT_BRANCH} | ||
ARG GIT_TAG="test" | ||
ENV GIT_TAG ${GIT_TAG} | ||
ENV GIT_TAG=${GIT_TAG} | ||
ARG BUILD_OPTS="" | ||
ENV BUILD_OPTS ${BUILD_OPTS} | ||
ENV BUILD_OPTS=${BUILD_OPTS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing CI warnings
4 warnings found (use --debug to expand):
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 8)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 10)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 12)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 14)
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/unable-to-select-correct-client-by-name-in-advanced-filter/70863/20 |
Confirmed working by OP on Discourse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, this PR is a great enhancement for the suggested domains/clients.
But I would like to suggest to return other data than it is returning right now: Currently, it returns the max_count
items from the resp. SQL queries. Esp. for domains this might be undesired. If I have a lot of high count permitted domains, but only a low count number of blocked domains, it will return only permitted domains as suggestions. But I think it should return both top allowed and top blocked domains. So maybe we could instead re-use the data we have for the top domains already (/stats/top_domain) and use those as suggestions instead?
For dis
Yes, we can make this return, e.g. 30 top permitted and 30 top blocked domains just to populate the dropdown.
This endpoint still uses the internal data structure and does not use the database. On the one hand, this data is already pre-processed and accessing it is fast, on the other hand, accessing this data blocks DNS resolution during the time it is accessed and is not very flexible. I will think about this, maybe we just don't need any flexibility here. |
What does this implement/fix?
Implement actual TOP suggestions for the Query Log by ensuring the most relevant domains and clients are returned (sorted by the most active being at the top) by the API
/api/queries/suggestions
endpoint. The result of this is used in the dropdown menus on the Query Log Advanced Filtering box:Related issue or feature (if applicable): Discourse
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.