Webserver provides a rest interface for reading the statistics. Modified JavaScript to make use of this functionality.