Skip to content
Damiano Falcioni edited this page Jun 28, 2017 · 7 revisions

ADOxx KPI WEB DASHBOARD


The ADOxx Web Dashboard is a web-based ADOxx component that gives the user the possibility to create a cocKPIt, using Key Performance Indicators and Goals that helps visualize real time values. The user has a set of configurable widgets which makes it possible to customize their visualizations depending on organization’s set goals and objective. The dashboard comprises of three main components: the KPI Model, the Web Interface and the DataSource Wrapper.

In this project the Web Interface and the DataSource Wrapper components are provided (right side of the architecture figure). Details on the KPI Model (left side of the architecture figure) can be found in the KpiDashboard-MM project wiki

ARCHITECTURE


WEB INTERFACE

TO BE COMPLETED


KPI DATASOURCE WRAPPER

The datasource wrapper is a Java component that contains several modules used to get data from the different type of datasource. It contains implementation classes for the above mentioned datasources which are exposed through an interface by inheriting methods from the interface.
It gets as input the type of the datasource and its configuration in a JSON format a provided by the JSON object generated from the KPI model component. The input is recognized by the module and returns a specific JSON with the value returned by the service. Each datasource module should implement an interface which contains methods that will return the module type, a brief documentation for the JSON as input and a method to process the configuration.

Interface abstract methods:

  • getUniqueName(): returns the unique name of the component/datasource
  • getDescription(): returns a JSON object containing a small description of the module in different languages
  • getConfigurationDescription():return the configuration JSON required by the module in order to work correctly. This JSON object must contain a JSON object for each parameter needed to be configured and each parameter must contain a JSON object for its description in different languages and a JSON string for passing the value of the parameter (that in this method will be empty).
  • obtainData(): This method calls the managed service using the provided configuration and returns the service output in a structured way. The configuration JSON as returned by the “getConfigurationDescription” method, but with the value field set. Returns a JSON object representing a table of data when possible, else a general output. In case of the table representation it must containing an array that describe the data columns and an array with a JSON object for each row.
  • isDataStructured(): Returns true if the obtainData method return a JSON representing a table, false when return a general output JSON

It will return the output in this specific JSON format:

{  
    columns : ['value', 'instantTime', 'field3']  
    data : [  
        {  
           value : '...',  
           instantTime : '...',  
           field3 : '...'  
       },{  
           value : '...',  
           instantTime : '...',  
           field3 : '...'  
       },{  
           value : '...',  
           instantTime : '...',  
           field3 : '...'  
       }  
   ]  
 }  

For a MySQL module as example, the columns will be the fields in the SELECT query and the data array will contain every row returned. The same idea can be applied to MSSQLServer, SPARQL, Excel sheets and services that return data in a known way.

In order to support services like REST that are to general to be fixed to a specific output format we provided a specific interface that must return a JSON like this:

{  
   dataFormat : '…',  
   data : '…'  
}  

The main component in either cases will check the correctness of the format of the module output.

Datasource Wrapper Modules

The wrapper has available for now 5 modules which allow the user to connect to the particular data source or database and it is implemented by an interface. The module mainly gets the connection parameters, retrieves, and transforms the retrieved data and then return the output in a specific JSON format. The available datasource modules are:

  • excel-datasource : is used to connect and extract data from a Excel sheet. Require the parameters:

    • file : url/path of the Excel sheet,
    • sheet number : page of the Excel sheet,
    • password : (optional) in case the Excel file is password protected,
    • cells_series : comma separated list or rage of columns or rows that represent the set or the single cell/s that describe a series of data (e.g. "1;A" means my dataset is in the column "A" with its name in the row "1" ; "A;2" means my dataset is in the row "2" with its name in the column "A"; "1;A,C-F" means i have 5 dataset in the columns "A" and from "C" to "F" with their names in the row "1"; "A;2,6-4" means i have 4 dataset in the rows "2" and from row 6 to 4, so "2", "6", "5", "4", with their names in the column "A"). Each serie names specified will be available as kpi fields.
    • cells_values : is a range that indicate where are the data for each series (e.g. "2-4" means all the data for each serie, supposed to be specified in columns, can be found from the row "2" to "4"; "4" means there is only one value in the row "4" for all the series).
  • mysql-datasource : is used to connect to a datasource of type MySQL. Require the parameters:

    • host : used to specify the Host,
    • port : used to specify the Port Number,
    • database : used to specify the Name of Database,
    • username : used to specify the Database Username,
    • password : used to specify the Database Password,
    • query : used to specify the SELECT query to perform. Each SELECT name specified will be available as kpi fields.
  • mssqlserver-datasource : is used to connect to a datasource of type Microsoft SQL Server and requires the parameters:

    • host : used to specify the Host,
    • port : used to specify the Port Number,
    • database : used to specify the Name of Database,
    • username : used to specify the Database Username,
    • password : used to specify the Database Password,
    • query : used to specify the SELECT query to perform. Each SELECT name specified will be available as kpi fields.
  • triplestore-datasource : is used to connect data from a Triple Store exposing query endpoint. Requires the parameters:

    • endpoint : url of the triplestore query service,
    • sparql_query : used to specify the SELECT query to perform. Each SELECT name specified will be available as kpi fields.
  • rest-datasource : is used to get data from a REST service. Parameters to be set are:

    • endpoint : url of the REST service,
    • method : POST/GET,
    • requestedContentType : e.g. "application/x-www-form-urlencoded",
    • querystring : e.g. "?param1=val&param2=val&param2",
    • postData : (OPTIONAL) data to post,
    • additionalHeaders : (OPTIONAL) Additional headers to append to the request, separated by "\n" (e.g. "Accept: application/json\nAuthorization: Basic YTphQGE=")

The DataSource Wrapper will check the correctness of the format of the module output once it has been returned.

Clone this wiki locally