Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is the demo page for the reporting module.

The docker can be build from the home folder using the given command : docker build -t reporting ./reporting/docker/

and run using : docker run -p 5000:5000 reporting

The main page of the reporting module asks for the URL of the JSON object containing the data for the reports:

 

Image Removed

On providing the link, the module will tabulate the data and plot the graphs:

Image Removed

 About this project:

  • The project aims at creating graphs to support the SNIA reports. The data for the reports are fetched from the OPNFV Test Results ReST API. 
  • The report (generated by the reporting module) looks like the following example:
    Image Added

Workflow

A Flask server is used to fetch the data and is sent to the client side for formation of the graphs (Using Javascript).

  • Step 1: Data is fetched from the OPNFV Test Results ReST API
  • Step 2: The fields "report_data" and "metrics" are taken from the JSON object retrieved in the above step and sent to the client side.
  • Step 3: The "report_data" is obtained by the client side and a parser written in Javascript along with Plotly.js forms the graphs.

 

Directory structure:-

storperf/docker/storperf-reporting/ contains the code used for this project.

...

|-- Dockerfile                         # Dockerfile for the storperf-reporting container
|-- requirements.txt                   # pip requirements for the container
`-- src                                # Contains the code for the flask server
    |-- app.py                         # Code to run the flask application
    |-- static                         # Contains the static files (js,css)
    |   |-- css                        # Contains css files
    |   |   `-- bootstrap.min.css      
    |   `-- js                         # Contains the javascript files
    |       |-- bootstrap.min.js
    |       |-- Chart.min.js
    |       |-- jquery-2.1.3.min.js
    |       |-- jquery.bootpag.min.js
    |       `-- plotly-latest.min.js   # Used for plotting the graphs
    `-- templates
        |-- index.html
        `-- plot_tables.html

Graphing libraries and tools:-

  • Plotly.js is used as the graphing library for this project (Link: https://plot.ly/javascript/)
  • Bootstrap is used for the UI of the project.