Commit Graph
74 Commits
Author SHA1 Message Date
DL6ER 1142540aac Single out a few items from /api/info/system into /api/info/{sensors,host,ftl}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 20:16:31 +01:00
DL6ER 37bafc1365 Move /api/{ftl -> info}/client, /api/ftl/dbinfo -> /api/info/database, /api/ftl/sysinfo -> /api/info/system, and /api/version -> /api/info/version
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 20:16:31 +01:00
DL6ER 6233bb489a Add GET /config/_topics which will be helpful when automatically generating a Pi-hole settings page
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 20:16:31 +01:00
DL6ER 10ed1459b3 Add "allowed" as JSON (where applicable) and "type" in /api/config?detailed=true to allow automatic settings page generation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 20:16:31 +01:00
DL6ER 88e57ef9e3 Manage custom.list through the universal /config/dns/hosts instead of its own interface. This reduces code duplication.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-20 18:32:21 +01:00
DL6ER 91f2645ace Also allow all IPv6 addresses in default webserver ACL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-20 04:59:43 +01:00
DL6ER 2d6c25d573 Add GET /config/{element} for more specific requests as well as PATCH and DELETE /config/{element}/{value} for direct array manipulation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 18:19:19 +01:00
DL6ER a506d38d9f Materialize the pseudoelement config.port as config.dnsmasq.port (it can now also be changed)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 04:39:09 +01:00
DL6ER 1ae49c7baf Add /api/logs/{ftl,http,ph7}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 04:22:50 +01:00
DL6ER c901194d3b Rename /api/ftl/logs/dns -> /api/logs/dnsmasq
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:41:10 +01:00
DL6ER c34975180e Rename /api/ftl/endpoints -> /api/endpoints
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:37:11 +01:00
DL6ER 0c1c2b0bc3 Add /api/config:dnsmasq.cnames
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:33:01 +01:00
DL6ER 5e96022e63 Group endpoints in /api/ftl/endpoints by supported methods
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:11:57 +01:00
DL6ER ed6b809013 Modify removing and adding local DNS entries via path instead of payload
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 19:57:36 +01:00
DL6ER aefb636a34 Add missing API specs for /api/config:dnsmasq.dhcp.hosts
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 22:43:04 +01:00
DL6ER 952a296dd4 Add /api/dns/entries for manipulating the custom.list file (viewing, adding, and removing items)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 22:41:44 +01:00
DL6ER 73539fcf73 Convert swap memory to KB and add %used form RAM and SWAP in /api/ftl/sysinfo
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 21:39:44 +01:00
DL6ER 2411818ecc Add null values to /api/version if corresponding lines are not present in /etc/pihole/versions
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 13:30:23 +01:00
DL6ER aae3905334 Add /config dnsmasq.logging (bool)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 09:27:47 +01:00
DL6ER a0a9572d7b Add /api/versions docker.{local,remote}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 08:15:11 +01:00
DL6ER 3bb8050cf8 Remove extra system.hostname property from /api/sysinfo. It is already contained as system.uname.nodename of the very same API endpoint
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 20:36:49 +01:00
DL6ER 7afd123530 Add system.hostname and ftl.{pid,%cpu,%mem} to /api/ftl/sysinfo
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 10:08:03 +01:00
DL6ER 4a033795c1 Add misc.temp.unit and move misc.temp_limit to misc.temp.limit
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 19:27:24 +01:00
DL6ER 70127edd52 Add config.dnsmasq and routines to write dnsmasq config files
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-11 20:14:46 +01:00
DL6ER 8bbd49acf4 Modify /version to match the new /etc/pihole/versions file format
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:31:14 +01:00
DL6ER d8e95f4e46 Add config.http.interface.boxed and config.http.interface.theme primed by setupVars.conf:WEBUIBOXEDLAYOUT and WEBTHEME, respectively
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:25:24 +01:00
DL6ER 64441ed6d8 Add config.misc.temp_limit setting primed by setupVars.conf:TEMPERATURE_LIMIT (if available) used to signal beyond which temperature the frontend should consider the temperature "hot"
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:19:59 +01:00
DL6ER 140a365806 Tests: Set api.pwhash and dns.blocking.mode using PATCH /api/config
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:29:55 +01:00
DL6ER 4abba45878 Add "uname" object to /ftl/sysinfo containing the nodename, domainname, architecture and other details from uname
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:29:55 +01:00
DL6ER f199ac2f08 Automatically migrate the API password hash and the lists of clients and domains to be excluded from setupVars.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:21:38 +01:00
DL6ER 448550fd9a Add PATCH /config which allows modifying all FTL config values. Changed values go into effect *immediately* and the config file is updated.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 20:55:31 +01:00
DL6ER 8efd253529 Merge remote-tracking branch 'origin/development' into new/http
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 18:37:13 +01:00
DL6ER e145d20d28 Rewrite the entire config-related code to allow for changing data without having to restart. Hereby, we greatly reduce code duplication in the TOML routines so we won't have to touch tme in the future when adding additional options.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 18:06:41 +01:00
DL6ER f2d68f20d7 Also verify endpoint structure: Query endpoints from FTL and check if all properties mentioned in the docs are present (and of correct type) and that there are no extra properties we forgot to document. Furthermore, also verify that the provided examples are of correct type, too.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 21:51:13 +01:00
DL6ER 5019cc7ac7 Add /api/stats/database/summary documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 20:17:34 +01:00
DL6ER 9c19abb86d Add /api/stats/query_types and /api/stats/database/query_types documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 20:06:52 +01:00
DL6ER 8588c5c62d Add /api/stats/top_clients and /api/stats/database/top_clients documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 19:24:14 +01:00
DL6ER 0b3a5baa0b Add /api/stats/top_domains and /api/stats/database/top_domains documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 19:11:02 +01:00
DL6ER 73c8783abc Add /api/stats/recent_blocked documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:41:41 +01:00
DL6ER ffacb1ad9e Add /history/database/clients documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:37:17 +01:00
DL6ER 225187447f Add /api/history/database documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:31:57 +01:00
DL6ER c7803df604 Add /api/stats/upstreams and /api/stats/database/upstreams documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:19:11 +01:00
DL6ER 4936e0688f Add documentation for /api/queries/suggestions
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:08:01 +01:00
DL6ER 8df3500c83 Move /api/ftl/gateway -> /api/network/gateway, /api/ftl/interfaces -> /api/network/interfaces, /api/ftl/network -> /api/network/devices, and /api/ftl/config -> /api/config and add documentation for /api/network/devices
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:52:13 +01:00
DL6ER 32279e0765 Also rename config options in test pihole-FTL.toml
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:08:45 +01:00
DL6ER bd5519c6bf Add API checking script
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-01 20:34:40 +01:00
DL6ER 3389b1f0c2 Add /api/ftl/config which can be used to retrieve the entire configuration of FTL. This endpoint only supports GET so far, however, we will add POST in the future so that configuration values can be changed through the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-01 18:19:36 +01:00
DL6ER c39a6e4080 Add /api/ftl/interfaces documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-31 20:18:20 +01:00
DL6ER 8f418a7788 Add /api/ftl/gateway documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-31 13:26:19 +01:00
DL6ER ffbe2bd370 Move /api/endpoints to /api/ftl/endpoints and add /api/ftl/endpoints documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-31 13:11:52 +01:00