friimaind / pi-hole-droid

Pi-hole Droid is an unofficial app that connects to your Pi-hole to show charts and statistics.
Apache License 2.0
127 stars 16 forks source link

Find a better way to handle ajax call #1

Open friimaind opened 7 years ago

friimaind commented 7 years ago

Maybe using something like https://api.jquery.com/jquery.when/

technicalpyro commented 7 years ago

for what it is worth i have been helping on some testing you may not need this once the FTL code is fully done i set this up with my test box and every page and graph loads in miliseconds

friimaind commented 7 years ago

@technicalpyro thank you :)

honestly my intent was to abstract from the API: for example creating a single file api.js where an object returns the data. This couldn't be done with the current code because $.getJSON is an asynchronous function.

I will investigate :)