Moved javascript code to index.js for index.html. Started to frontend for historical data graph.