Health Dashboard - Information - How to identify URI request of Simple REST Client related to a specific tile

Purpose
This page provides the methodology to identify the URI request of "Simple REST Client" related to a specific tile on CAST Application Analytics Dashboard (CAST HD) using F12 developer tools.
Applicable in CAST Version


Release
Yes/No
8.3.x (tick)
8.2.x (tick)
Applicable RDBMS
RDBM
Yes/No
Oracle Server (tick)
Microsoft SQL Server (tick)
CSS (tick)
Action Plan

F12 developer tools is a suite of tools to help you build and debug your webpage. The view you see through F12 tools is  how the actual way, the Browser Document Object Model (DOM) interprets the page.

In our case, the use of this tool is restricted, so we follow the steps below to help us to identify the URL request from  CAST Application Analytics Dashboard (CAST HD) to "Simple REST Client". for this please follow the steps below:

If your tile is specific to a Health Factor then follow the below steps -

  1. Get quality indicator id of the quality indicator appearing in the tile of CAST Application Analytics Dashboard (CAST HD): For getting id of quality indicator, edit the file %CATALINA_HOME%\webapps\CAST-HD\portal\resources\cmp.json, and identify "area" of your tile.
     Assuming that we investigate on the tile shown in the screenshot below:
     
     
    If, we edit the cmp.json file (%CATALINA_HOME%\webapps\CAST-HD\portal\resources\cmp.json), the definition of our tile is as follow: 

    	{
                        "id": 5,
                        "plugin": "QualityIndicatorResults",
                        "color": "yellow",
                        "parameters": {
                            "title": "Robustness",
                            "qualityIndicator": {
                                "id": "ROBUSTNESS",
                                "format": "0.00",
                                "description": ""
                            },
                            "widget": "gauge"
                        }
                    }

      Id of quality indicator of our tile is "Robustness".

  2. From measurement database, get metric id of the quality indicator, for this run the following sql query on your measurement database:

    SELECT metric_id
           metric_description 
    FROM   dss_metric_descriptions 
    WHERE  upper (metric_description) like 'ID OF QUALITY INDICATOR'

     

    special cases

     In measurement database, the following quality indicators of the tile of CAST Application Analytics Dashboard (CAST HD) do not have the same id in cmp.json:

    Tilte in cmp.jsonmetric_description in measurement data base
    Technical SizeLOCS
    Functional SizeOMG-Compliant Automated Function Points
    Number of violations to critical quality rulesCRITICAL VIOLATIONS

     For our example, on measurement database, we execute the following query:  

    SELECT metric_id, 
           metric_description 
    FROM   dss_metric_descriptions 
    WHERE  upper (metric_description) like 'ROBUSTNESS' 

     

    We get metric_id = 60013 as a result.
     
  3.  In ADD webpage, press F12 on keyboard, you will get a new edge on the webpage like the one shown in  the screenshot below:
     
    Identify the Metric Id on this page and the corresponding URL Request.
     
  4. Proceed to "Simple REST Client" and submit the URI Request. To have access to "Simple REST Client", enter the following link in browser:http://<server>: <port>/CAST-HD/static/default.html.

    You will see the following webpage

  5.  After  submitting the  URL Request, you will get the webpage of the requested HD tile.

    Note that after using F12 tool, in the list of URL requests, we find the URL "HD/results/?quality-indicators=60013&snapshots=$al". This URL correspond also to the Metric Id 60013. In fact, there are 2 tiles showing Robustness in CAST Application Analytics Dashboard (CAST HD), the second tile represent Evolution of robustness. You can see this in the screenshot below:   

     

  6. If your tile is not related to a specific Health Factor then please follow the below steps -

    Press F12 and hover your mouse on the tile with the problem.

    The href tag of the tile will contain your URI to be used on RestAPI






Notes/comments


Related Pages