2.12 - Workaround for change of metric ID (Application Components tile in Engineering Dashboard)

Issue description

LOC (line of code) values reported by the Application Components tile in the Engineering Dashboard now use the metric ID 66071 which is generated by CAST Imaging/CAST Console during the application onboarding process (when using fastscan mode). In previous releases, the CAST Engineering Dashboard exclusively used the metric ID 10151 which was generated only during the analysis. If the issue is present, the Application Components tile will show no value for the Lines of Code entry at all and you will need to perform a manual update to ensure the correct metric ID is configured in your Dashboard (see below).

This change may impact you depending on the combination of CAST Imaging v3 / CAST Console and CAST Dashboard releases you are using:

  • Using CAST Imaging v3: CAST Imaging generates the metric ID 66071, whereas the CAST Engineering Dashboard accepts only metric ID 10151, therefore in this scenario, a manual update to a CAST Engineering Dashboard .json file is required before the Application Components tile can show a value. This update is explained below.
  • Using CAST Console V2 (2.11.9 and above): CAST Console generates the metric ID 66071, whereas the CAST Engineering Dashboard accepts only metric ID 10151, therefore in this scenario, a manual update to a CAST Engineering Dashboard .json file is required before the Application Components tile can show a value. This update is explained below.
  • Using CAST Console V2 (older than 2.11.9): CAST Console generates the metric ID 10151 and this will be accepted and displayed by the CAST Management Dashboard with no changes required.

Manual update to the .json file

The files governing which metric ID is used in the Application Components tile are located here:

WAR
CATALINA_HOME\webapps\CAST-Health\WEB-INF\classes\config\ed\ed.json

Installed JAR
<installed_data_folder>\config\ed\.json

You will need to open the file and search for a tile configuration called "ComponentInvestigationOverview", for example:

{
	"type":"ComponentInvestigationOverview",
	"parameters":{ 
		"metric": 10151
	},
	"color":"mauve",
	"col":3,
	"row":1,
	"sizex":2,
	"sizey":1,
	"max-sizey":2,
	"max-sizex":2,
	"id":"c930"
},

Update the "metric" value to whichever ID you require according to the scenarios listed above. Save the file and then restart the dashboard service to ensure the change is taken into account. You may also need to re-analyze your application.