Commit Graph

66 Commits

Author SHA1 Message Date
Christian König
0387377bc8 Do not try to resolve hostname of clients in long-term data
Signed-off-by: Christian König <ckoenig@posteo.de>
2021-10-22 13:20:17 +02:00
yubiuser
e9ab7cfa08 Fix require func.php
Signed-off-by: yubiuser <ckoenig@posteo.de>
2021-08-01 19:36:07 +02:00
DL6ER
03920e3595 Move validation functions into func.php and use the same validation in all cases.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2021-07-25 16:59:16 +02:00
yubiuser
6c41ab8c20 Status in lowercase
Signed-off-by: yubiuser <ckoenig@posteo.de>
2021-02-19 19:53:02 +01:00
yubiuser
1acb0b440a Inlcud new query types in long term graph and top lists
Signed-off-by: yubiuser <ckoenig@posteo.de>
2021-02-19 06:54:58 +01:00
DL6ER
fa2279d473 Add SVCB and HTTPS types and reduce code duplication
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-12-31 10:54:01 +01:00
Adam Warner
62ac184116 replace "~" by " " in getAllQueries response
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2020-12-23 18:42:51 +00:00
DL6ER
4ee491115a Show upstream destination a query was sent to in the Query Log (both standard and long-term)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-11-13 01:01:49 +01:00
DL6ER
a901489a96 Merge branch 'devel' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-05 22:24:17 +02:00
DL6ER
e7eec95ba4 Use all the new Pi-hole v5.0 blocking status code also in the long-term data where it was forgotten to add them.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-02 10:03:32 +02:00
DL6ER
eb3c672545 Show explicitly which hostname belongs to which IP address when hovering over the hostnames. Note that the IP addresses and host names were already in the same order, before.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-27 19:59:53 +02:00
DL6ER
450c912d18 Add support for FTL DB version 8 in the API (host names stored in the network_addresses table).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-18 14:19:44 +02:00
DL6ER
b0f54f5451 Add new Pi-hole diagnostics page.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-17 16:07:21 +03:00
DL6ER
fe10059517 Finalize sub-queries to ensure we're not running out of memory with hundreds of clients (can result in O(N^2) memory requirements).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-14 18:43:35 +02:00
DL6ER
3e1a1f59aa Add support for multiple hostnames per client (hardware address).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-14 18:43:35 +02:00
DL6ER
00040d4372 Fill missing time intervals with zero
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-24 10:10:55 +02:00
DL6ER
ba4d974fb4 Add support for new NAPTR query type
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-03-17 23:03:59 +00:00
DL6ER
306b0b94a9 Merge pull request #1098 from pi-hole/tweak/graphs
Change over-time graphs from line to stacked bar representation
2019-12-28 16:46:41 +01:00
DL6ER
aca6461468 Change over-time graphs from line to stacked bar representation. This is much more natural for this kind of data. Also, improve DB graphs to always generate a meaningful display (always generate about 200 bars). This graph was basically unusable when specifying a larger range than, say, one week.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-18 13:22:33 +00:00
DL6ER
600c16c269 Add Client group management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-13 14:40:29 +00:00
DL6ER
4d1beeb8bf UTF-8 encode all strings read from the database before JSON-encoding them
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-11-02 10:20:18 +01:00
DL6ER
2e2896add3 Merge pull request #964 from pi-hole/new/networktable_ip_neigh
Add IPv6 support for network table
2019-07-04 11:44:10 +02:00
Mark Drobnak
392802687d Merge pull request #900 from pi-hole/tweak/long_term_data_padding
Always show the full requested range in the long-term API results
2019-06-16 17:32:22 -04:00
DL6ER
fb96e6ff21 Reposition parseDBData() to simplify diff output
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 14:08:26 +02:00
DL6ER
7c4dee6f2d Simplify getGraphData and round and to match the requested .
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 14:06:52 +02:00
DL6ER
99a53fcfd4 Remove fallback to ip column in network table as we removed this column in DB version 5. There will always be a corresponding entry for each device in the network table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-16 12:30:36 +02:00
DL6ER
1096179245 Fix (almost) endless loop when there are no (or no blocked) queries in the selected interval.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 16:24:00 +02:00
DL6ER
d2ce57b48b Check IP field not entire object
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 15:58:12 +02:00
DL6ER
764a0b1a3a If a device is unknown in the network_addresses table, we fall back to the IP address stored in the network table. This might be the case for devices that have not been seen since a long time.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 08:52:47 +02:00
DL6ER
cbd8eb6148 Remove variable $ipaddr
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-15 08:45:31 +02:00
DL6ER
425b6ba5a7 Show at only the three most recent IP addresses for each device. The hover text of contains all IP addresses.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-14 19:17:52 +02:00
DL6ER
0895a6f044 network_addresses(id) has been renamed to netword_addresses(network_id)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-14 18:09:27 +02:00
DL6ER
4aea8999cb Offer multiple IP addresses through API if available
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-06-11 00:18:54 +02:00
DL6ER
8b0ee8f4fa Reduce code duplication
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-04-26 18:29:05 +02:00
DL6ER
506644b671 Rewrite web interface to allow interaction with database-based lists
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-04-25 15:02:39 +02:00
DL6ER
ab31284f26 Always show the full requested range. Fill data with zero at the end when the daterange is extending into the future. Similarly, fill data wil zero at the beginning if the requested range extends into a region without recorded queries.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-01-20 11:56:49 +01:00
DL6ER
3305982c32 Merge branch 'devel' into new/network-details 2018-12-29 20:21:32 +01:00
DL6ER
9291e8fe50 Simplify API code
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-12-28 12:18:08 +01:00
DL6ER
cb552159ac Add new "network" API endpoint to database API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-12-27 09:44:43 +01:00
Mcat12
47d71f4708 Change spaces to tabs in bugfix
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-07 17:06:02 -05:00
Mcat12
127d46d1f9 Fix query types in long term query log being incorrect
Besides A and AAAA, the other query types would show up as AAAA instead
of their actual name.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-11-07 16:59:38 -05:00
DL6ER
d2ecf1c70a Use comma-separated list of type integers instead of byte-coded integer.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-30 15:02:33 +02:00
DL6ER
3169b5ba88 Add selection for query types on long term DB query log page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-08-24 14:09:08 +02:00
Mcat12
34f89a83e7 Fill in empty db graph data intervals with zero
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-07-22 12:26:45 -04:00
DL6ER
322b87befe Imporve resolveHostname() subroutine
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-05 16:48:05 +01:00
DL6ER
57f0642c0f Remove unused array
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-05 15:46:23 +01:00
DL6ER
746ac1ea3f Prevent confusion between arrays
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-05 15:45:22 +01:00
DL6ER
f132122e57 Use better client host name caching for DB queries
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-03-05 09:21:11 +01:00
DL6ER
3769069a0a Obtain host names for IP addresses in database. This can also handle cases where we have mixed host names and IP addresses in the result (Pi-hole v3.3+ stores IP addresses in the database, for consistency)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2018-02-17 20:05:33 +01:00
Mcat12
3f4421da4b Use intval() and SQLITE3_INTEGER in api_db.php
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
2018-01-20 10:58:41 -05:00