Commit Graph
866 Commits
Author SHA1 Message Date
DL6ER 24b6df4cb4 Reduce code duplication by factoring out filter regex compilation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-20 09:33:06 +01:00
DL6ER 862d4922e1 Merge branch 'development-v6' into new/queryLogRegex
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-16 22:46:31 +01:00
Dominik c39261131a Merge pull request #1832 from pi-hole/tweak/limit_history_clients
Limit number of clients returned by /api/history/clients
2024-01-16 22:37:33 +01:00
DL6ER 5c4355f1b1 Compile exclude regexes only once, not N^2 times
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-16 22:35:53 +01:00
DL6ER 3c58e3089b Change order of objects in documentation (small nit pick)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-16 21:51:55 +01:00
DL6ER 12e7f44b92 Return null as version in /api/info/version if not available
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-15 20:58:44 +01:00
DL6ER 4e5521f400 Add new config option to API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-13 10:50:18 +01:00
DL6ER 03466460c3 Add webserver.api.maxClients setting to set default number of clients to be returned for the client activity graph. This setting can be overwritten at run-time
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-13 10:39:22 +01:00
DL6ER 58637597bf Merge branch 'development-v6' into tweak/limit_history_clients 2024-01-13 10:32:56 +01:00
DL6ER e35aa78030 Only free API data when the API was started
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-13 10:08:43 +01:00
DL6ER e9e43094bf Remove webserver.api.excludeRegex and instead allow regex to be used in the existing excludeDomains and excludeClients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-13 08:20:53 +01:00
DL6ER aa8285846b Remove excludeClients from Client activity over time (/api/history/clients)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-13 07:59:18 +01:00
DL6ER 4024af9cdd Only compare against valid filter strings
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-11 17:50:21 +01:00
DL6ER 0eb1aaa8f4 Extend webserver.api.excludeClients and webserver.api.excludeDomains to the Query Log
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-11 17:35:47 +01:00
DL6ER cff605b14e Further simplify skipping logic
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-10 21:49:54 +01:00
DL6ER 23d116caac Regex filtering is filtering: We need to do full counting to get the correct number of rows
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-10 21:44:51 +01:00
DL6ER e24c36327d Merge branch 'development-v6' into fix/delete_dhcp_lease
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-10 20:02:09 +01:00
DL6ER 14af354979 Do not rely on the old behavior of empty password is always correct when no password is set when changing the latter
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 21:16:30 +01:00
DL6ER 35e1acb533 Do not accept password login when the system is configured to not require a password
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 15:26:56 +01:00
DL6ER a961a4d14f Do not accept DELETE session if no session is used (this also applies to password-less or localhost-no-auth mode)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 15:20:24 +01:00
DL6ER ee367a6c38 Merge branch 'development-v6' into new/queryLogRegex
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:59:10 +01:00
DL6ER 901d838cf9 Merge branch 'development-v6' into tweak/limit_history_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:55:07 +01:00
DL6ER 1d83e39421 Extend 204/404 logic to /dhcp/leases/{ip}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:51:39 +01:00
DL6ER 85e3d4dd08 Extend 204/404 logic to /config/{element}/{value}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:51:35 +01:00
DL6ER 06147abd5d A 204 response must not contain a body (https://tools.ietf.org/html/rfc7231#section-6.3.5)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:51:35 +01:00
DL6ER 55e0e84a92 Extend 204/404 logic to /network/devices/{device_id}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:51:31 +01:00
DL6ER c0172130fd Extend 204/404 logic to /info/messages/{message_id}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:51:27 +01:00
DL6ER bb50a106d1 A few fixed for the response code documentation of the :batchDelete elements
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:20:28 +01:00
DL6ER e5e9d11211 Fix DELETE API endpoints. They should return 204 when something was deleted and 404 is nothing was found at this resource
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-07 09:04:20 +01:00
Dominik 933e6f605f Merge pull request #1728 from pi-hole/tweak/query_auth
Add authentication via query string
2024-01-07 07:50:58 +01:00
Dominik 34464923cf Merge pull request #1851 from pi-hole/new/location
Add Location header for newly created groups/clients/domains/lists
2024-01-07 07:50:20 +01:00
Dominik 9b9e7b7307 Merge pull request #1813 from pi-hole/fix/too_many_top_domains
Only include as many domains as we have in the sorted array
2024-01-07 07:49:58 +01:00
Dominik e48ee5fcd6 Merge pull request #1835 from pi-hole/fix/one_of_string_array
Fix one-of definition in clients, domains, groups, and lists POST
2024-01-07 07:48:42 +01:00
DL6ER 8806f6427f Add Location header for newly created groups/clients/domains/lists
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-01-06 18:16:42 +01:00
Dominik 977acf480c Merge pull request #1766 from pi-hole/new/teleporter_v5
Add support for legacy Teleporter archives
2024-01-06 16:42:04 +01:00
Dominik c2af66d225 Merge pull request #1806 from pi-hole/tweak/even_better_database
Use WAL, remove (and strip) SQLite3 shared-cache support and improve attached database handling
2024-01-06 13:43:21 +01:00
Artur Kordowski 98127f12b9 Fix API dns/blocking documentation
Signed-off-by: Artur Kordowski <9746197+akordowski@users.noreply.github.com>
2024-01-05 15:45:26 +01:00
DL6ER 2665da72f4 Remove SQLite3 URI feature - we do not need it any longer. It is not part of the regular SQLite3 shell builds.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-23 12:19:13 +01:00
DL6ER f683244444 Attach disk database once when initializing memory database and don't bother detaching it - it will finally be detached when FTL terminates
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-23 12:19:13 +01:00
DL6ER 7915b0a4a0 Fix one-of definition in clients, domains, groups, and lists POST request payloads
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-20 17:15:41 +01:00
DL6ER fb1160df71 Reduce default N from 20 to 10 as experiments suggest that even 10 is at the border of being still readable
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-20 16:59:12 +01:00
DL6ER b32d5adbdb Add special client "other clients" summing all client activity that has not been included due to more clients being active than being returned (due to limited N)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-20 16:57:44 +01:00
DL6ER fa6a8b38e9 Limit the number of clients to return to the number of clients to avoid possible overflows for very large N and add N=0 as special option to return all clients (even if the user does not know how many there are)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-18 22:49:37 +01:00
DL6ER aa123cacde Limit number of clients returned by the /api/history/clients endpoint to 20. This can be overwritten at compile-time and at run-time using the query parameter ?N=...
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-18 22:00:44 +01:00
Dominik 1a0921cd48 Merge pull request #1810 from pi-hole/new/batchDelete
Implement special POST :batchDelete callbacks
2023-12-15 20:19:09 +01:00
DL6ER 2e2104bbf5 Merge branch 'development-v6' into fix/too_many_top_domains
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-13 19:49:46 +01:00
Dominik 8eef4d81bb Merge pull request #1786 from pi-hole/tweak/session_no_ip
Do not pin SID to a specific IP address
2023-12-13 19:46:43 +01:00
Dominik 6d8cbe5b52 Merge pull request #1823 from pi-hole/tweak/soc_thermal
Add soc_thermal as CPU temperature sensor
2023-12-13 19:44:52 +01:00
DL6ER 048e32e38d soc_thermal is a suitable CPU temperature sensor
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-12-11 21:44:06 +01:00
DL6ER c73b042b0f Merge branch 'development-v6' into new/batchDelete 2023-12-11 20:43:49 +01:00