Flask Web Application
In this post, I will describe the Web application I have setup. This application basically uses a Sqlite3 database to store the information of all the CVMFS servers. It shows the list of servers currently in database. If the user is logged in, he/she can add to the list of servers. They only need to add the name of the server and the URL. Then the application performs a GeoIP look-up and adds the server’s latitude and longitude to the database.
There is a method called
init_db which reads the input file containing the servers names and locations. It populates the database with the contents of this file. New entries are added to the database in the
Here is the main page, showing a form to add new servers. It also lists the servers currently existing in the database:
After scrolling down on the main page, there is a button called
Plot Voronoi. Clicking on this redirects to
http://127.0.0.1:5000/voronoi. On this URL the Voronoi diagram is displayed.
On clicking the
Plot Voronoi button, the plot is displayed on