DL6ER
32c2471e04
Check if version is of format vX.YYY or vXX.YYY to decide whether on a deployed version or not
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-12-07 22:42:24 +01:00
Mcat12
3331c42971
Move getPayload to api.c
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-11-26 22:59:24 -05:00
DL6ER
33132c72d6
Use GIT_BRANCH not GIT_TAG ...
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-11-03 19:35:03 +01:00
DL6ER
ff6af26d04
Apply the same logic for the API request ">version"
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-11-03 19:29:14 +01:00
DL6ER
fbc5c6d914
Merge pull request #143 from pi-hole/new/pihole_status_stats
...
Detect pihole blocking status
2017-10-25 18:22:25 +02:00
DL6ER
06efbdf5bb
Merge pull request #134 from pi-hole/new/clientsovertime
...
[WIP] Add clients over time data structure
2017-10-10 19:06:20 +02:00
DL6ER
95f76ad0e4
Detect pihole blocking status and return this on API request
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-10-05 17:48:00 +02:00
DL6ER
2baad5c1a4
Fix that API is expecting a different format of FTL's answer in FTL itself for the sake of convenience (the output format is now similar to ">forward-names")
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-30 10:37:31 +02:00
DL6ER
b1833aee97
Merge branch 'development' into tweak/killmessage
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-29 22:50:56 +02:00
DL6ER
88e5e2941e
Merge branch 'development' into new/clientsovertime
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-29 22:50:05 +02:00
DL6ER
42c0dcc1e6
Apply API_EXCLUDE_CLIENTS filtering to algorithm that returns clients over time data
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-29 22:34:13 +02:00
Mcat12
e5c4d19aaa
Merge remote-tracking branch 'origin/development' into new/API
2017-09-26 00:37:38 -04:00
DL6ER
83f7a41c97
Remove extra newline
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-24 23:25:59 +02:00
DL6ER
d8e037fc32
Send confirmation after ">kill" command
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-24 11:20:04 +02:00
DL6ER
ff2c0ea964
Always send EOM at end of transmission (if connection is still alive)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-24 11:13:30 +02:00
DL6ER
a14167fcf9
Return absolute instead of relative data in client over time requests
2017-09-23 13:03:25 +02:00
DL6ER
199fccf643
Add ">ClientsoverTime" request
2017-09-22 20:50:21 +02:00
DL6ER
891cfa5bf5
Ensure percentages in forward destinations do always sum up to one
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-22 17:10:01 +02:00
DL6ER
14b0b17119
Just fix the typo
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 22:57:13 +02:00
DL6ER
f249126ed4
Revert "Fixed a typo and added some parentheses to the new equations for the sake of readability."
...
This reverts commit 93b57db17f .
2017-09-20 22:56:19 +02:00
DL6ER
93b57db17f
Fixed a typo and added some parentheses to the new equations for the sake of readability.
2017-09-20 22:32:18 +02:00
DL6ER
a186a53731
Implemented comments from GitHub
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 22:01:13 +02:00
DL6ER
557569ce6b
:codacy: is very critical about reduction of scopes of variables
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 17:36:16 +02:00
DL6ER
1b6d9e714b
Check for potential floating point exceptions if we have zero queries in memory
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 17:25:36 +02:00
DL6ER
3088020c01
Return also percentages for query types over time
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 17:11:56 +02:00
DL6ER
00d49759f6
Modify forward destinations over time to give normalized percentages
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 17:07:52 +02:00
DL6ER
995addfbc9
Make ">querytypes" return percentages
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 16:46:05 +02:00
DL6ER
fc63712add
Make ">forward-names" use the same function as ">forward-dest unsorted" because these two routines do exactly the same thing. Remove the obsolete function.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 16:41:00 +02:00
DL6ER
9790cfd531
Make ">forward-dest" return normalized percentages instead of absolute numbers
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-09-20 16:32:25 +02:00
Mcat12
834a9598eb
Add Wildlist support
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-09-04 16:25:55 -04:00
Mcat12
fb574f7485
Perform better request endpoint checking
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-16 21:04:58 -04:00
DL6ER
8ebc2e7f51
Add comments to the code
2017-08-13 15:22:40 +02:00
DL6ER
21c9a497e2
Make "unique_clients" returning the number of clients that have been active within the most recent 24 hours (match the behavior of top-clients). Add "clients_ever_seen" to preserve the information of how many unique clients FTL has seen in its runtime (whether or not they have been active recently)
2017-08-13 14:53:45 +02:00
DL6ER
13b8a8312d
Add "withzero" as an option for "top-clients" to show also known clients that have zero queries within the most recent 24 hours
2017-08-13 14:52:47 +02:00
Mcat12
06be1c4806
Move debug API request logging to see all requests
2017-08-11 21:05:07 -04:00
Mcat12
1893aa5c25
Add whitelist and blacklist deletion API endpoints
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-10 23:10:44 -04:00
Mcat12
9b98101177
Fix JSON "not_found" message
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-08 23:08:58 -04:00
Mcat12
ebe0631e5c
Add dummy POST handling for whitelist and blacklist
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-08 23:08:54 -04:00
Mcat12
4762b8a55c
Reorganize to split up API functions
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-06 19:06:12 -04:00
Mcat12
345ac16558
Revert "Sanitize domains when outputting /stats/history"
...
This reverts commit 0a6f5a5
The sanitizing will instead be implemented off of dev in the log parsing section.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-07-29 12:36:38 -04:00
Mcat12
0a6f5a5ad1
Sanitize domains when outputting /stats/history
...
This will have to be extended to the other domain-emitting API calls in future commits.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-07-28 23:06:45 -04:00
Mcat12
c9de13b492
Merge remote-tracking branch 'origin/development' into new/API
2017-07-17 22:13:12 -04:00
DL6ER
845bf8354f
Offer unsorted list of forward destinations (test may fails)
2017-07-08 13:59:23 +02:00
DL6ER
32c2a414c0
Don't send header multiple times
2017-07-04 20:19:28 +02:00
DL6ER
ccbf0ee552
Add "GET /stats/dashboard"
2017-07-04 20:16:14 +02:00
Mcat12
7c88707fef
Rename /dns/recent_blocked to /stats/recent_blocked
...
As this is also shown on chronometer, it seems to be related to stats more than anything else.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-30 17:30:28 -04:00
Mcat12
52d336496f
Rename /history to /stats/history
...
It provides stats more than DNS functionality. However, it is in more of a gray area than, say, queries over time.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-30 17:28:58 -04:00
Mcat12
08391f46fc
Rename /stats/overTime/graphs to graph
...
It's returning one graph, not multiple.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-30 14:40:26 -04:00
Mcat12
e0f462e1bf
The newline?
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-26 22:22:16 -04:00
Mcat12
542e26cbe4
Merge remote-tracking branch 'origin/new/API' into new/API
2017-06-26 21:32:36 -04:00