New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTL #408

Merged
merged 35 commits into from Mar 3, 2017

Conversation

Projects
None yet
5 participants
@DL6ER
Member

DL6ER commented Feb 19, 2017

By submitting this pull request, I confirm the following (please check boxes, eg [X] - no spaces) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?: 10


FTL integration

  • Dynamically fall back to PHP API functions to ensure API does always respond even if FTL is not running for some reason (note: not implemented for Query Log page, but only dashboard)
  • Use PHP API from current devel branch
  • Increase flexibility in getQueryTypes API call
  • Hide top ads list if nothing to display
  • Proper display of activated privacy mode
  • Remove spinner (would otherwise not be removed for zero results)
  • Update tables every 10 seconds
  • Update query types and forward destinations plots every 10 seconds
  • More verbose output in top lists (total number next to percentage in tooltip)
  • Implemented "recentBlocked" keyword for API
  • Ensure compatibility with PHP5 version < 5.4
  • Adjust output format of overTimeData10mins to comply with PHP API
  • Further speedup of Query Log page by showing only the recent 10 minutes by default
  • Hide temperature if FTL is not running and show FTL status
  • Add information to Settings page
  • Adjust error message when loading of query log failed
  • Move processing of domainname, clientIP, clientname and time interval filters for the Query Log page to FTL for speed enhancement
  • Generate link if pi.hole comes up in the Top Domains list
  • Remove resolve DNS names option - this is now enabled by default (daemon will only do it once per day instead of PHP-API which did it on every reloading of the web interface)
  • Add socket timeout of 10 seconds + modification to Settings page since FTL backend supports API_EXCLUDE_CLIENTS filtering with both IP addresses and host names (also mixed)
  • Improved Query Log page

Note that api_PHP.php is a simply copy of the old api.php and unchanged.

This template was created based on the work of udemy-dl.

DL6ER added some commits Feb 14, 2017

Squashed commit of the following:
- Dynamically fall back to PHP API functions to ensure API does always repond even if FTL is not runnung for some reason
- Update PHP API from current devel branch
- Increase flexibility in getQueryTypes API call
- Hide top ads list if nothing to display
- Proper display of activated privacy mode
- Remove spinner (would otherwise not be removed for zero results)
- Update tables every 10 seconds
- Update query types and forward destinations plots every 10 seconds
- More verbose output in top lists (total number next to percentage in tooltip)
- Implemented "recentBlocked" keyword for API
- Ensure compatibility with PHP5 version < 5.4
- Adjust output format of overTimeData10mins to comply with PHP API
- Further speedup of Query Log page by showing only the recent 10 minutes by default
- Hide temperature if FTL is not running and show FTL status
- Add information to Settings page
- Adjust error message when loading of query log failed
- Move processing of domainname, clientIP, clientname and time interval filters for the Query Log page to FTL for speed enhancement
- Generate link if pi.hole comes up in the Top Domains list
- Remove resolve DNS names option - this is now enabled by default (daemon will only do it once per day instead of PHP-API which did it on every reloading of the web interface)
- Add socket timeout of 10 seconds + modification to Settings page since FTL backend supports API_EXCLUDE_CLIENTS filtering with both IP addresses and host names (also mixed)
- Improved Query Log page
Conflicts:
	api.php
	scripts/pi-hole/php/FTL.php
	scripts/pi-hole/php/auth.php
	scripts/pi-hole/php/password.php

@DL6ER DL6ER added the Enhancement label Feb 19, 2017

@DL6ER DL6ER added this to the v3.0 milestone Feb 19, 2017

@DL6ER DL6ER changed the title from New/ftl integration to [WIP] FTL Feb 19, 2017

Merge branch 'devel' into new/FTL-integration
Conflicts:
	scripts/pi-hole/php/auth.php
	scripts/pi-hole/php/password.php

@DL6ER DL6ER referenced this pull request Feb 19, 2017

Closed

First discussion #1

DL6ER added some commits Feb 19, 2017

DL6ER added some commits Feb 20, 2017

@SnaKKo

This comment has been minimized.

SnaKKo commented on c3047f7 Feb 20, 2017

I'd reserve type to indicate the API type (php, ftl) and version for the API version (1, 2, ect...).

Something like this:

api.php?type=php&version=1

With fallback default values:

  • type = php
  • version = 1

It will more easy to improve API in the future (ex: with version 2, 3) maintaining the backward compatibility.

This comment has been minimized.

Member

DL6ER replied Feb 20, 2017

Good idea

DL6ER added some commits Feb 20, 2017

DL6ER added some commits Feb 23, 2017

Some simplifications + center 10min interval data in the middle inste…
…ad of the beginning of the corresponding interval
@@ -1,151 +1,82 @@
<?php

This comment has been minimized.

@DL6ER

DL6ER Mar 1, 2017

Member

Github fails to detect that there is basically no change in the PHP API. The old file api.php is not rewritten, but moved to api_PHP.php. This api.php is an entirely new file.

@codacy-bot

This comment has been minimized.

codacy-bot commented Mar 1, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- scripts/pi-hole/js/queries.js  5
- scripts/pi-hole/php/savesettings.php  1
- scripts/pi-hole/js/index.js  5
         

See the complete overview on Codacy

@DL6ER DL6ER changed the title from [WIP] FTL to FTL Mar 3, 2017

@PromoFaux

This comment has been minimized.

Member

PromoFaux commented Mar 3, 2017

Approved

Approved with PullApprove

@DL6ER DL6ER merged commit fff8427 into devel Mar 3, 2017

3 checks passed

codacy/pr Good work! A positive pull request.
Details
code-review/pullapprove Approved by DL6ER, PromoFaux
Details
licence/cla Contributor License Agreement is signed.
Details

@DL6ER DL6ER deleted the new/FTL-integration branch Mar 3, 2017

@pralor

This comment has been minimized.

pralor commented Aug 4, 2018

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-3-0-is-here-featuring-our-new-ftl-engine/2828/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment