Skip to content

Files

Latest commit

 

History

History

AJAX

AJAX + CGI approach

  1. A static .html page (either stats_basic.html or stats_bootstrap.html) is sent to the client
  2. As soon as the page is loaded into the browser, a GET request is sent to the server and ajax_stats.py is executed
  3. The server responds with a JSON object containing statistics about the system
  4. Whenever the refresh button is pressed these last two steps are repeated. If auto-refresh-checkbox is checked, last two steps are repeated at regular intervals.

Endpoints

URL Description Return value Return format
/stats_basic.html Main page, basic version Front-end web page HTML
/stats_bootstrap.html Main page, beautiful and responsive version Front-end web page HTML
/cgi-bin/ajax_stats.py AJAX endpoint System statistics JSON