Skip to content
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

Add query type "Blocked (special domain)" #2185

Merged
merged 2 commits into from Apr 24, 2022
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Apr 24, 2022

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes, and have included unit tests where possible.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)

What does this PR aim to accomplish?:

Add new query type "Blocked (special domain)"

Screenshot from 2022-04-24 09-19-46

I used the same orange color we are using for the other special blocking type "database busy" as this type really isn't something like other ads we want to block. Whether it should be orange or rather red is open for discussion, comments are appreciated.

How does this PR accomplish the above?:

Adds interpretation for the new query type implemented in pi-hole/FTL#1338. This PR won't do anything without FTL being updated/switched to a version that contains the code from pi-hole/FTL#1338, however, it is also harmless without and may be merged at any time.

What documentation changes (if any) are needed to support this PR?:

None

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team April 24, 2022 07:23
Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orange is fine, it's special and different from "normal" blocked.


db_queries.js need some additions:
https://github.com/pi-hole/AdminLTE/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/scripts/pi-hole/js/db_queries.js#L146-L148

https://github.com/pi-hole/AdminLTE/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/scripts/pi-hole/js/db_queries.js#L156-L164

https://github.com/pi-hole/AdminLTE/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/scripts/pi-hole/js/db_queries.js#L187


Do we need a new checkbox for the filtering of the long-term database?


I did not check all the various counters in the web interface. Is the new query status included in the dashboard counters and the "upstream servers"?

@jfb-pihole
Copy link
Sponsor Member

Orange is good.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER
Copy link
Member Author

DL6ER commented Apr 24, 2022

The new status is considered blocked so part of blocklist. Seems a fair compromise to me.

Concerning your other comment: I added the checkbox and the code changes where necessary. It isn't necessary to change

https://github.com/pi-hole/AdminLTE/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/scripts/pi-hole/js/db_queries.js#L158

because the code on the right is "not in this list" which is correct behavior here.

@dschaper
Copy link
Member

Color passes Daltonization. (Color Blind tests).

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bildschirmfoto zu 2022-04-24 19-42-08

@yubiuser yubiuser merged commit 50e61a7 into devel Apr 24, 2022
@yubiuser yubiuser deleted the new/query_special_domain branch April 24, 2022 17:47
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-16-web-v5-13-and-core-v5-11-1-released/56384/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants