Display DPA AG information in Orion

Hi,

I have been asked if it would be possible to display information about Availability Groups from DPA on a dashboard in Orion. 

With the help of we were able to reproduce the following information from DPA

as Custom Tables in Orion with the following result:

However we had to use some workarounds as there is no documentations regarding statuses

Sample query:

SELECT 

--------------------------------------------------------------
--r.REPLICA_NAME AS [Node]
(concat('<img src="/Orion/images/StatusIcons/Small-',n.StatusLED,'" width="16" height="16">') + '<a href="/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + CAST(n.nodeid as varchar(10))+'">'+ r.REPLICA_NAME + '</a>') AS [Node]
--------------------------------------------------------------
--,r.HEALTH AS [Health]
,CASE 
	when r.HEALTH = 2 then (concat('<img src="/Orion/images/StatusIcons/Small-Up.gif" width="16" height="16">','<b>Up</b>'))
	when r.HEALTH = 1 then (concat('<img src="/Orion/images/StatusIcons/Small-Down.gif" width="16" height="16">','<b>Down</b>'))
	else (concat('<img src="/Orion/images/StatusIcons/Small-Unknown.gif" width="16" height="16">','<b>Unknown</b>') + CAST(r.HEALTH as varchar(10)))
END AS [Health]
--------------------------------------------------------------
--,r.ROLE AS [Role]
,CASE 
	when r.ROLE = 1 then ('<b>Primary</b>')
	when r.ROLE = 2 then ('Secondary')
	else ('<b>Unknown</b>' + CAST(r.ROLE as varchar(10)))
END AS [Role]
--------------------------------------------------------------
--,r.AVAILABILITY_MODE AS [Availability Mode]
,CASE 
	when r.AVAILABILITY_MODE = 0 then ('Asynchronous')
	when r.AVAILABILITY_MODE = 1 then ('Synchronous')
	else ('<b>Unknown</b>' + CAST(r.AVAILABILITY_MODE as varchar(10)))
END AS [Availability Mode]
--------------------------------------------------------------
--,r.FAILOVER_MODE AS [Failover Mode]
,CASE 
	when r.FAILOVER_MODE = 0 then ('Automatic')
	when r.FAILOVER_MODE = 1 then ('Manual')
	else ('<b>Unknown - </b>' + CAST(r.FAILOVER_MODE as varchar(10)))
END AS [Failover Mode]
--------------------------------------------------------------
--,r.CONN_STATUS AS [Connection Status]
,CASE 
	when r.CONN_STATUS = 1 then (concat('<img src="/Orion/images/StatusIcons/Small-Up.gif" width="16" height="16">','<b>Up</b>'))
	when r.CONN_STATUS = 2 then (concat('<img src="/Orion/images/StatusIcons/Small-Down.gif" width="16" height="16">','<b>Down</b>'))
	else (concat('<img src="/Orion/images/StatusIcons/Small-Unknown.gif" width="16" height="16">','<b>Unknown - </b>' + CAST(r.CONN_STATUS as varchar(10))))
END AS [Connection Status]
--------------------------------------------------------------

FROM [dpa_repository].[ignite].[CON_AG_REPLICA] r

JOIN [SolarWindsOrion].[dbo].[Nodes] AS n ON r.REPLICA_NAME = n.Caption

--WHERE r.REPLICA_NAME = 'XXX' OR r.REPLICA_NAME = 'XXXX'

ORDER BY r.REPLICA_NAME

So my question is if its possible to get our hands on any kind of documentation regarding the status codes for DPA or maybe there is an easier way to do it :)