Commit Graph

862 Commits

Author SHA1 Message Date
DL6ER
f3d8f0dfb5 Teleporter expects adlist.json during import, however, the file is called adlists.json during export. Fix this by using singular during export.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-18 00:36:03 +02:00
DL6ER
d42180d2be Pass possible exception from SQLite3_connect_try() to the calling process. This makes this function return either valid SQLite3 objects (success) or strings (errors). We can pass the errors to the user interface to help user helping themselves.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-02 21:34:39 +02:00
DL6ER
bc4f508970 Merge pull request #986 from pi-hole/new/whitelist-regex-support
Add whitelist regex support
2019-09-01 14:23:50 +02:00
DL6ER
d97c85f724 Slightly change the message shown when domains are duplicates.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-29 17:26:32 +02:00
DL6ER
50e5349ee4 If some domains are not added, then this happened because they are duplicates. Highlight this in the success message.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-29 16:53:00 +02:00
DL6ER
fcc49e3928 Wrap addition and removal of domains in a transaction + deliver a more detailed success message to the user specifying how many domains are actually added (in case some already existed).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 19:26:51 +02:00
DL6ER
d101465c62 Pass through errors to user interface
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 18:53:10 +02:00
DL6ER
4743228a86 Allow domains to be added by hitting return (add them as exact domains).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 17:19:05 +02:00
DL6ER
df6fd5e1c4 Use correct IDs for spinners in index.js
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-27 16:56:42 +02:00
Mark Drobnak
a7d07f9f79 Merge pull request #991 from pi-hole/new/user-definable-temp-limit
Add TEMPERATURELIMIT setting
2019-08-21 09:02:54 -04:00
DL6ER
693a2f4e60 Change key: TEMPERATURELIMIT -> TEMPERATURE_LIMIT
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-21 10:09:47 +02:00
Mark Drobnak
ba0cdde840 Merge pull request #984 from denny0754/denny0754
Issue#983
2019-08-20 15:01:31 -04:00
DL6ER
9f25f34398 Add TEMPERATURELIMIT setting in setupVars.conf for setting the level beyond which we show the temperature icon in red on the dashboard.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-20 14:07:34 +02:00
TheME
ee3d7b2803 remove unneeded class 'far'
Signed-off-by: Th3M3 <the_me@hotmail.de>
2019-08-09 11:56:15 +02:00
DL6ER
e66d0c4a74 Limit maximum length of each domain to 253 characters. We should document this somewhere if power users want to add insanely long regex filters, they will have to do this by directly interacting with the database.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 22:25:17 +02:00
DL6ER
965f2083a6 Remove special handling for audited domains and just add them separately to both lists.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 22:20:00 +02:00
DL6ER
586224fde2 Replace PREG_SPLIT_NO_EMPTY by using trim().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:57:59 +02:00
DL6ER
3770556732 Use database.php:add_to_table() in teleporter.php:archive_insert_into_table().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:49:51 +02:00
DL6ER
838516e558 Ensure preg does not output empty array elements.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:44:01 +02:00
DL6ER
07af532b09 Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:32:49 +02:00
DL6ER
d568b49fb1 Add busy timeout so adding/removing domains does not immediately fail in case the database is busy.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:24:05 +02:00
DL6ER
71fc7a4791 Use preg_split() instead of explode() for better space handling. Skip empty domains in add_to_table() and remove_from_table().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-07 21:23:29 +02:00
DL6ER
7807f12d65 Fix codefactor complaints.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 22:08:18 +02:00
DL6ER
7fdafb2dcc Update comment and code in sub.php
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 22:06:44 +02:00
DL6ER
424fe7636b Call "sudo pihole restartdns reload" after having added or removed domains to notify FTL of the updated lists.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 22:02:36 +02:00
DL6ER
98e5f21373 Move add_to_table() to database.php.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 20:49:49 +02:00
DL6ER
5b9ccecd11 Limit max length for a domain entry to 253 chars when importing from teleoprter archives, skip longer entries without importing them.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 20:40:20 +02:00
DL6ER
6ca35b0b76 Update comment and change require() to require_once().
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 20:32:49 +02:00
DL6ER
464e55461d Fix indentation.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-06 20:29:32 +02:00
DL6ER
c53832c9d0 Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-05 22:06:53 +02:00
DL6ER
c9f5c9500a Directly modify gravity tables from the lists pages.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-05 21:55:08 +02:00
DL6ER
bc7aef744c "pihole --whiteregex" has been renamed to "pihole --white-regex". Similar for "--whitewild" -> "--white-wild".
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-08-05 21:13:53 +02:00
TheME
5ea4e6d185 fix broken Icons
Signed-off-by: Th3M3 <the_me@hotmail.de>
2019-08-04 21:11:32 +02:00
denny0754
8991605f04 Fixed Issue#983 2019-08-01 18:14:32 +01:00
DL6ER
13f07f9d87 Switch the teleporter to only interact with gravity.db directly. This avoids any need for escaping regexes and just seems to be the right thing to do. Ensure that we flush a table only once (in case multiple files add to the same table).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 23:15:19 +02:00
DL6ER
eac87f139f pihole-FTL only needs to be reloaded not restarted when the lists have been updated. This is much faster than a hard restart.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 22:19:28 +02:00
DL6ER
3cfb226757 Reload only ONCE not after EACH imported file.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 22:14:48 +02:00
DL6ER
72057cfa26 Close database connection at the end of a table recovery.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 22:14:07 +02:00
DL6ER
72c0233436 Add option to flush tables during import (defaults to true). By unchecking this box, users can import (= only add) other lists without loosing the present content. Conflict management is done through INSERT OR IGNORE which will silently skip entries that violate the UNIQUE constraint.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 21:15:32 +02:00
DL6ER
1ddf36a752 Archive and restore full tables instead of only domains. Use JSON as backup file format.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 21:10:19 +02:00
DL6ER
cd2daa3239 Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-24 19:41:04 +02:00
DL6ER
3ebf766240 Simplify add() in list.js.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-22 21:43:12 +02:00
DL6ER
b7fe518159 Remove heading when list goes empty.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-22 21:38:58 +02:00
DL6ER
31d0b32103 Only show headings when we have domains for the respective list (regex / exact).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-22 21:35:42 +02:00
DL6ER
dfcfafd6d9 Implement whitelist regex support to web interface.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-22 21:15:50 +02:00
Mcat12
c5b25f23e5 Add missing break
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-07-09 20:37:05 -07:00
Mcat12
bc85bcda7b Prevent static DHCP leases from having duplicate hostnames
Fixes #979

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-07-09 20:35:15 -07:00
Mark Drobnak
77845474d8 Merge pull request #968 from pi-hole/new/domain_groups_enabled_status
Lists: Highlight if domains are disabled
2019-07-07 17:18:42 -04:00
DL6ER
eeb4598925 Fix hardcoded table name.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-07 22:40:34 +02:00
Mark Drobnak
f18e287150 Merge pull request #977 from lightswitch05/feature/batch-audit-requests
Feature: Batch audit requests
2019-07-07 14:58:02 -04:00