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
DL6ER
551351b178
We don't show "pi.hole" anymore in the results. Adjust tests (also for the API component) accordingly.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-07 12:43:25 +02:00
DL6ER
f64251eb3f
Merge branch 'development' into new/API
2017-08-07 11:00:20 +02:00
Mcat12
4762b8a55c
Reorganize to split up API functions
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-06 19:06:12 -04:00
DL6ER
b21092226f
Merge pull request #123 from pi-hole/tweak/overtime_full_data
...
Ensure that data in overTime data struct in contiguous.
2017-08-06 22:22:23 +02:00
DL6ER
306af05c96
Don't add extra zeros at the very end of the output
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-06 19:23:04 +02:00
DL6ER
ac259b82d6
Avoid accessing invalid time stamps at the very beginning of the log parsing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-06 19:14:37 +02:00
DL6ER
797822e80e
Ensure that data in overTime data struct in contiguous. Previously, we stored only timestamps for which we actually have found data. This may lead to uncertainties in plotting engines.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-06 18:38:48 +02:00
Mcat12
1c77d9e59c
Merge pull request #122 from pi-hole/tweak/break_on_DB_errors
...
Limit maximum number of logged errors
2017-08-02 23:03:06 -04:00
DL6ER
c93482b85f
Avoid passing unused parameter to logg()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-02 17:47:29 +02:00
DL6ER
38dbe66a37
Limit maximum number of loged errors
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-08-02 17:34:21 +02:00
DL6ER
dcfddaa041
Merge pull request #118 from pi-hole/new/ignore_pi.hole
...
Skip queries with domain "pi.hole" during log parsing
2017-08-01 20:10:41 +02:00
Mcat12
e9e4cd500f
Merge branch 'development' into new/ignore_pi.hole
2017-08-01 09:17:14 -04:00
Mcat12
a1a4167ca7
Merge pull request #119 from pi-hole/fix/invalid-domains
...
Ignore invalid domains (containing ")
2017-08-01 09:15:20 -04:00
Mcat12
c74e8eb92f
Ignore invalid domains (containing ")
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-07-29 19:11:38 -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
DL6ER
2ad0beab0a
Merge pull request #117 from pi-hole/fix/DBret
...
Improve error messages and check for more return codes in various database subroutines
2017-07-23 11:53:12 +02:00
DL6ER
320e10f211
Adapt test suite as pi.hole is now an ignored domain (we will also check for that it does not appear anywhere in the statistics)
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-07-20 20:34:40 +02:00
DL6ER
c8314dec8b
Skip queries with domain "pi.hole" during log parsing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-07-20 20:22:45 +02:00
DL6ER
152e2c922e
Improve error messages and check for more return codes in various database subroutines
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-07-18 12:09:49 +02:00
DL6ER
f8cd0ffcd1
Merge pull request #113 from pi-hole/tweak/DBerrors
...
Improve DB error handling
2017-07-18 10:35:40 +02:00
Mcat12
c9de13b492
Merge remote-tracking branch 'origin/development' into new/API
2017-07-17 22:13:12 -04:00
DL6ER
1af079cee2
Merge branch 'development' into tweak/DBerrors
2017-07-17 18:07:56 +02:00
DL6ER
8b316c3d8a
Merge pull request #115 from pi-hole/fix/Travis-CI
...
Fix Travis test suite (work around a Travis bug)
2017-07-17 18:07:24 +02:00
DL6ER
5a5b04be43
Explicitly kill FTL at the end of the test suite to mitigate a Travis bug ( https://github.com/travis-ci/travis-ci/issues/8082 )
2017-07-17 11:53:45 +02:00
DL6ER
0fee00ad70
Define ret bool
2017-07-13 16:59:17 +02:00
DL6ER
d0da785ac8
In case a DB action failed, we now log the failed request string. Also add some improvements with respect to error checking (don't silently ignore when begin of a transaction failed, related to #112 )
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2017-07-13 16:56:08 +02:00
DL6ER
6f2e6a8128
Merge pull request #110 from pi-hole/new/unsorted_forward_destinations
...
Offer unsorted list of forward destinations
2017-07-11 13:12:17 +02:00
DL6ER
845bf8354f
Offer unsorted list of forward destinations (test may fails)
2017-07-08 13:59:23 +02:00
DL6ER
3f3e0ff337
Merge pull request #109 from pi-hole/tweak/crash_message
...
Improve crash message
2017-07-08 01:08:49 +02:00
DL6ER
952024107f
Improve crash message
2017-07-07 17:55:29 +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
DL6ER
126056da78
Merge pull request #107 from pi-hole/tweak/mutex_threadlock
...
Use low-level mutual exclusive locks
2017-07-02 11:49:23 +02:00
DL6ER
d8d526aff3
Use low-level mutex locks to ensure FTLs main datastructure can only be accessed by one thread at a time.
2017-07-01 18:39:19 +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
DL6ER
0cad09d44d
Merge pull request #106 from pi-hole/tweak/try_again_pihole.log
...
Try again to open pihole.log if necessary
2017-06-28 18:56:14 +02:00
DL6ER
47fd38c7fc
Try to open pihole.log a second time if failed first time
2017-06-28 17:15:42 +02:00
Mcat12
e0f462e1bf
The newline?
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-26 22:22:16 -04:00
Mcat12
5693b723a7
Fix top domains and ads tests
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-26 22:17:17 -04:00
Mcat12
542e26cbe4
Merge remote-tracking branch 'origin/new/API' into new/API
2017-06-26 21:32:36 -04:00
Mcat12
cfea5cfca3
Only give relevant total in top domain JSON output
...
If it's `top_ads`, give `ads_blocked_today`. If it's `top_domains`, give `dns_queries_tdoay`. Both are not needed at the same time.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-06-26 21:32:15 -04:00
DL6ER
bbb3df2fe5
Add a missing space, our tests require 100% accuracy
2017-06-26 16:35:51 +02:00
DL6ER
f566fd30dd
Fix tests
2017-06-26 16:27:02 +02:00
DL6ER
0dfb855605
Merge branch 'development' into new/API
...
Conflicts:
request.c
2017-06-26 16:08:38 +02:00
DL6ER
9976ff7425
Merge pull request #105 from pi-hole/fix/printf_to_logg
...
Code cleanup (use logg instead of printf)
2017-06-26 14:33:11 +02:00
DL6ER
66ecea9c59
Replace printf by logg since we want this messages to go to the log
2017-06-26 10:42:23 +02:00