Commit Graph

886 Commits

Author SHA1 Message Date
Adam Warner
b7d3ddd2b0 Merge branch 'devel' into release/v4.3.2 2019-09-22 00:58:42 +01:00
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
Mark Drobnak
bfe7b76f34 Merge pull request #974 from pi-hole/fix/admin-email-validation
Prevent command injection via admin email
2019-09-12 21:11:19 -04:00
DL6ER
c399043db4 Use correct IDs for spinners in index.js
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:11:18 -04:00
DL6ER
e567983bb3 Change key: TEMPERATURELIMIT -> TEMPERATURE_LIMIT
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:11:17 -04:00
DL6ER
b66302bb9f 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-09-12 21:11:14 -04:00
denny0754
01a29f6555 Fixed Issue#983 2019-09-12 21:11:13 -04:00
TheME
704f983243 remove unneeded class 'far'
Signed-off-by: Th3M3 <the_me@hotmail.de>
2019-09-12 21:11:13 -04:00
TheME
e816c28fd0 fix broken Icons
Signed-off-by: Th3M3 <the_me@hotmail.de>
2019-09-12 21:11:12 -04:00
Mcat12
580f1eb06d Add missing break
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-09-12 21:11:11 -04:00
Mcat12
fafd5b419b Prevent static DHCP leases from having duplicate hostnames
Fixes #979

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-09-12 21:11:10 -04:00
Daniel
f6aeac5a1c Improve audit logic to batch requests.
Signed-off-by: Daniel <daniel@developerdan.com>
2019-09-12 21:11:10 -04:00
Mcat12
964c54360b Don't show the "Click to ..." tooltip when filtering is disabled
Fixes #971

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2019-09-12 21:05:57 -04:00
DL6ER
a8b4cb74d8 Check data before converting. This allows us to detect if there is no data for the graph so we can hide it. Fixes #932
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:53 -04:00
DL6ER
c7aa2556a1 Add source URL to the JS file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:50 -04:00
DL6ER
83013993cd Also show "N/A" if the name column is NULL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:50 -04:00
DL6ER
a027715247 Move ip-address-sorting into its own file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:49 -04:00
DL6ER
f830bfbc7b Add IP address sorting for the network table, based on https://datatables.net/plug-ins/sorting/ip-address
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:48 -04:00
DL6ER
c8086b4239 Check fields against null before trying to obtain their lengths.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:47 -04:00
DL6ER
19d6f4ae9f Move dataIndex definition into dataSrc function
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:46 -04:00
DL6ER
cdefb1ca60 Use Array.map() instead of looping over elements and pushing the content to a new array
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:45 -04:00
DL6ER
a4fe802fb9 Apply the same changes also for the database query list
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:44 -04:00
DL6ER
2175efd605 Use the render option of the columns definition to specify how and when the date string is shown.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:44 -04:00
DL6ER
77931b499a Remove extra ID column, this is intentionally done in a separate commit
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:43 -04:00
DL6ER
695730920a Ensure correct sorting of queries even if they happened withing the same second. Fixes #934
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-12 21:05:42 -04: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