I'm not sure how often the import trigger happens.
Would it be possible to add a flag (yeah, yet another) to pihole
that would import and dedupe /etc/pihole/adlists.list
?
DL6ER
February 11, 2020, 3:54pm
8
Pi-hole v5.0 does not use the lists files anymore, instead, we use a common database (/etc/pihole/gravity.db
) as single source of truth. You can always add/edit/delete everything Pi-hole related in here using the SQL editor of your preference.
I will think about how much work restoring the mass-injection (separated by spaces) feature would be. If it is manageable (I think it is), I will add it.
1 Like
Awesome Thank you. For current users it should not be an issue, but for new users or installs it could be something they might use.
DL6ER
February 11, 2020, 7:13pm
20
Mass-injection of items will be restored by
pi-hole:release/v5.0
← pi-hole:new/space-separated-item-injection
opened 07:12PM - 11 Feb 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
Allow users to add multiple groups/clients/domains/adlists at once by space-separating them. All added items will receive the same comment (if specified).
**Example 1**
![Screenshot from 2020-02-11 20-05-57](https://user-images.githubusercontent.com/16748619/74269873-84b9c400-4d0a-11ea-86f2-e7d11e576b45.png)
resulting in:
![Screenshot from 2020-02-11 20-06-03](https://user-images.githubusercontent.com/16748619/74269878-85eaf100-4d0a-11ea-8a9f-c603638bab91.png)
**Example 2**
![Screenshot from 2020-02-11 20-06-29](https://user-images.githubusercontent.com/16748619/74269838-753a7b00-4d0a-11ea-9d4e-1fd91bd46540.png)
resulting in:
![Screenshot from 2020-02-11 20-06-41](https://user-images.githubusercontent.com/16748619/74269843-77043e80-4d0a-11ea-89bd-bdea7bcd19ca.png)
Also, we remove the redundant list management from the settings page as this code was only partially migrated to the database backend (it was planed to be replace, anyway) and still uses CLI callbacks in the background. It is not needed any longer. I added a link to the new page so users will not be confused by a sudden absence of the settings tab.
**How does this PR accomplish the above?:**
Implement processing of space-separated items as individual entries.
**What documentation changes (if any) are needed to support this PR?:**
None
3 Likes
I just saw your comment for that pull request
Also, we remove the redundant list management from the settings page as this code was only partially migrated to the database backend (it was planed to be replace, anyway) and still uses CLI callbacks in the background. It is not needed any longer. I added a link to the new page so users will not be confused by a sudden absence of the settings tab.
Why not go a step further: remove Whitelist and Blacklist from the side-panel as well? One can do the same configuration (and even more) in Group management/Domains. Its kind of confusing to have two places for setting up white- and blacklists. In the end white/blacklists displaying just filtered information from the Group management/Domain table. You could also combine it with what if suggested here : add the ability to filter the list, not just sorting it. This would "restore" the classical white/blacklist view by only display selected items.
Impression what I mean with filter:
DL6ER
February 15, 2020, 6:59am
22
I did something similar now in
pi-hole:release/v5.0
← pi-hole:new/unify_domain_pages
opened 07:43PM - 14 Feb 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
Simplify domain management by using the same page for both locations where domains can be edited. This removes a large amount of duplicated code, each prone to its own bugs.
Some modifications ensure that features like automatic conversion to the legacy "wildcard" style. This is only available on the "simpler" pages to not confuse users (this happened a few times in the past).
**How does this PR accomplish the above?:**
See above.
**What documentation changes (if any) are needed to support this PR?:**
None
Nice work.
Two things: I would still prefer (or in addition) see the above suggested filter.
And: Long regex brake the UI.
I thinks this might be the same issue that was resolved here - is it just due to switching branches or did you remove the patch by accident?
DL6ER
February 15, 2020, 1:25pm
24
yubiuser:
Long regex brake the UI.
No, this UI is not broken here at all. A horizontal scrolling bar is added and you can reach everything.
What else would you expect to happen if you put in such a lengthy regex?
In the referenced issue, the table exceeded the page and you were not able to reach the other elements. This is not happening here and the table remains fully usable (at least I have not seen anything showing the opposite).
I would expect some line breaks to avoid a horizontal scrolling bar.
/edit:
Now I get them - I didn't change anything (maybe a browser cache issue?). This is what I would expect in a responsive table. Maybe the line breaks don't work in all circumstances?
Your're right - this was a different problem.
/edit2:
I noticed the order of the entries in the blacklist changed as well... the long entry was #20 in the post above and is now #26 . Don't no if this matters... I think the database ID is the same.
DL6ER
February 15, 2020, 9:07pm
26
Do you see the same in different browsers? Also, there shouldn't be this [object Object]
thing where the select list should be... What browser is this?
It is at least strange, the table should be default order by the database ID, did you click any of the column headers for sorting?
This was on chrome. Now it's gone
No. It seams like chrome sorts for domain and firefox for database ID.
Cleared chromes cache and now the sorting is by database ID. But I get Object Object
again
EDIT:
Clicked again on "Blacklist" (Chrome) and it l looks ok. Seems like the fist time the view got messed up between blacklist and group management/domains.
Steps to reproduce on Chrome:
clear browser cache, restart browser, log in to pihole web UI, click on blacklist --> UI error with Object object
--> click again on blacklist --> everything is fine.
Just leaves the missing line breaks in firefox...
DL6ER
February 16, 2020, 7:01am
30
Thanks for all your tests, so far! Could you please update once more and check if the situation improved for both issues (long domain/regex wrapping + [object Object]
on first visit)?
With the latest changes both issues are resolved!
Chrome: Blacklist on first startup
Firefox:
@DL6ER
Could you apply the line break patch to 'Group management/Adlists' as well?
DL6ER
February 16, 2020, 3:46pm
33
Please try
pihole checkout web tweak/wrap_other_tables
Working in firefox and chrome.
1 Like
Do I need to checkout the weak/wrap_other_tables branch to get this to work?
I've tested with a space and with a carriage return but haven't gotten it work.
Thanks
DL6ER
March 31, 2020, 9:47pm
37
pi-hole:release/v5.0
← pi-hole:new/space-separated-item-injection
opened 07:12PM - 11 Feb 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
Allow users to add multiple groups/clients/domains/adlists at once by space-separating them. All added items will receive the same comment (if specified).
**Example 1**
![Screenshot from 2020-02-11 20-05-57](https://user-images.githubusercontent.com/16748619/74269873-84b9c400-4d0a-11ea-86f2-e7d11e576b45.png)
resulting in:
![Screenshot from 2020-02-11 20-06-03](https://user-images.githubusercontent.com/16748619/74269878-85eaf100-4d0a-11ea-8a9f-c603638bab91.png)
**Example 2**
![Screenshot from 2020-02-11 20-06-29](https://user-images.githubusercontent.com/16748619/74269838-753a7b00-4d0a-11ea-9d4e-1fd91bd46540.png)
resulting in:
![Screenshot from 2020-02-11 20-06-41](https://user-images.githubusercontent.com/16748619/74269843-77043e80-4d0a-11ea-89bd-bdea7bcd19ca.png)
Also, we remove the redundant list management from the settings page as this code was only partially migrated to the database backend (it was planed to be replace, anyway) and still uses CLI callbacks in the background. It is not needed any longer. I added a link to the new page so users will not be confused by a sudden absence of the settings tab.
**How does this PR accomplish the above?:**
Implement processing of space-separated items as individual entries.
**What documentation changes (if any) are needed to support this PR?:**
None
and
pi-hole:release/v5.0
← pi-hole:tweak/wrap_other_tables
opened 04:50PM - 16 Feb 20 UTC
**By submitting this pull request, I confirm the following:**
- [X] I have r… ead and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [X] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [X] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
- [X] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
---
**What does this PR aim to accomplish?:**
Enable wrapping of too long lines in the group management tables.
**How does this PR accomplish the above?:**
Add class `breakall` to all `<code>` tags in all tables.
**What documentation changes (if any) are needed to support this PR?:**
None
have been merged.
Please go back onto track using
pihole checkout web release/v5.0
Thanks for using the Pi-hole!
1 Like