Explicit Search in Pi-hole Admin Console

How about

(use Ctrl or Command ...)

I fear the slash may lead people to try them both at once.

Oh ... I wasn't aware that Mac has them BOTH but redefines how Ctrl works. But rereading your initial comment on this makes this clear. Oh boy, they are really special... :apple: :clapping:

I will replace / by or when github is up again:


Do we want to keep the click icon?

Click icon?

I replaced the "click" text by a mouse cursor icon in the two screenshots above.

1 Like

I like the color highlighting.

I've been thinking about another/better way of handling filtering/searching explicite and smart without rewriting DataTables.
What do you think about such an approch? Omit the onclick filtering and add column-specific search fields (maybe transforming the input into regex to be explicite) ? This is intuitiv as it is clear that the search field applies to the specific column only plus you keep the smart "global search". Benefit would also be that one could delete an specific filter/search individually - something that is not possible atm with the "click to add multiple selection" because you can only remove all all filtering at the same time.

I would still love to be able to search/filter on status and on reply (without time - so only IP/CNAME/...).

Yes, we can do this, however, this will again remove the exact searching ability. Entering 10.0.0.1 would again match 10.0.0.101 as well.

How so? If we remove the onClick events, users will have to type or copy-pasta text for anything to happen.

The other fields are "processed fields" - FTL sends only indices, e.g., 5 which gets then shown as Blocked (exact blacklist). While we could add filtering on them (as we'd internally simply filter by said ID), searching these fields in full-text mode will not be possible (DataTables just sees the IDs, the human-readable only gets added when rendering for user displaying).

This would be possible, whatever we add in addition will likely make a manual necessary to be shown on this page.

Available as of now. Try selecting multiple items which holding down Ctrl and then unselecting one of them by holding down Shift while you click on the column.

You're right, this would be unhandy. You could restore the "inject into search field by click" (re-coupling filter/searching) but insert into the column specific field.

Whats about this suggestion at the bottom for explicit search based on regex. This could be enabled just for column specific search fields.

Works.

Yes, however, it would still force you to use ^10.0.0.1$ (the \s...\s solution will not work with per column search boxes).

We need to decide at some point what we want, I'd prefer to have this before I invest more work into something we will discard in the end :wink:
I will add filtering on the remaining fields (except time and button) when I return home. As said, per-column search boxes would not work here (without modifications to the DataTables core). This seems to be in favor of my current solution with highlighted on-click filtering columns.

:sob:

Of course. Maybe other devs (and users) have an opinion on that

Don't get me wrong - this is a good solution. Just not the perfect one (for me) :wink:

I like the solution as currently implemented. It's simple, intuitive and will be easy for users to understand.

I added filtering on the status. Adding it on the reply type as well would be very complicated, as this data is actually not available in the table (it is rendered from the data received from FTL but not stored in DataTables search buffers (DataTables stores only the content of those columns shown, FTL sends a few columns more containing the DNSSEC status, the reply time, etc.).

I may be able to revisit reply type filtering later, however, keep expectations low on this for now.

2 Likes

Thanks for adding status filtering. Unfortunately we have forgotten one thing: If a blocked regex appears and filtering is active a click on that status has a double function: open a tab to show the corresponding regex and filter for regex status. It workes but it's not the best behavior to execute 2 functions with one click.

I'm not sure if this is feasible but would solve this problem and would make overall filtering more intuitive: Remove the "click to filter" option and set it to on (so turning everything into links) but only filter on "Ctrl + Click" (even for the first filter). With additional "Ctrl+Click" on another column add this to the filter. This way users could select text without filtering, but would also be able to easily filter. Click on regex would open a new tab to show the corresponding regex rule, "Ctrl+Click" would add the status regex to filtering.
Removing filtering with "Shift+Click" (or: "Ctrl+Click" on an already added column?).


Additionally I found a bug: Clicking on regex link sometimes opens multiple tabs. With every click the number of tabs increase. (I had the impression there was already a fix for this but could not find it anymore. Maybe a regression? Or added after this branch was created?)
Found the commit.

I do like this idea a lot. Also removed the necessity for the check box. I'll implement this change whenever I'm back home.

I added the missing reply type filtering now (had to rearrange some data internally in the table).
Now we can also see which kind of reply was sent in case of blocking (will be IP for most of you when you block with 0.0.0.0). Previously, the reply type was always - in case of blocked queries. We'll have to see if this is an improvement or not. It surely eases the filtering.

I also changed filtering to work only on Ctrl/Command + click (add columns) and Shift + click (remove columns).
The checkbox is gone.

The hint text needs to be updated, still, also to mention that you can get something from Shift + click as well. Suggestions are welcomed.

It's really great now!

I don't see any hint text (mouse over) at the moment. How flexible is this - can it be specific for every column? You could use "Command + Click to add this Type/Domain/.... to the filter". If there is already a filter for column say "Shift + Click to remove this Type/Domain from the filter".
For regex the mouse over must contain two lines; the one already in place ("Click to show matching regex filter") and one of the above.

At the end of the table.
"Filter for Query type, Domain, Clients, Status and Reply

  • use Ctrl or + Click to add elements to the filter
  • use Shift+ Click to remove elements from filter

On my Mac, I now see nothing in the query log:

Reverting web back to Release 5.0 beta resolves it and the query log is back.

Is there anything on the Developers Console?

I removed them. Do we need them at all? I don't think so. With "hint" I meant the bold text at the bottom. Where the check box was as well.

The mouse over texts were mostly intended to warn the user that a click might behave differently than expected (filtering instead of text selection). This "abnormal" behavior is now gone as you need to hold down Ctrl now.

Yes, it was.

I think we should just go down this path. Maybe "column" instead of "elements"?

This is the only error showing. I cleared the browser cache prior and reloaded the page. No change from previously.