Hi all, come into a problem regarding custom HTML scripts. Currently in our environment we use the custom html widget to take in geographical data along with microwave link data to draw a geographically correct network map for internal use however due to a few hiccups of how devices and SolarWinds stores and presents information, we have had to implement a custom SQL table to rectify these issues (and improve performance). However, in swapping to a SQL table have run into the issue where we were previously successfully using AJAX to gather data within JavaScript via the following method: doesn't work for SQL as the path /Orion/Services/Information.asmx/QueryWithParameters rejects SQL queries.
$.ajax({
type: 'POST',
url: '/Orion/Services/Information.asmx/QueryWithParameters',
data: "SWQL QUERY",
contentType: "application/json; charset=utf-8",
dataType: "json"
})
I know this functionality is possible as table widgets can use SQL queries, I sought to find the answer within those and saw they use the path of '/orion/rendercontrol.aspx' however while it is possible to use this to return SQL query data, it presents it as a massive long list all formatted within a HTML table itself, so all the data would then need to be extracted out of the string all contained by <td> and <tr> elements, which sounds like a logistical nightmare and is simply unnecessarily expensive computationally.
Would anyone have any pointers as to if there is a path that can be used to return SQL queries via AJAX or other methods within JavaScript?
Writing at the end of the day, so please as questions if need be.
PS. The custom table exists within our Solarwinds Database at [SolarwindsOrion].[dbo].[customtablename]
PSS. The query we are looking to use is:
SELECT * FROM [SolarWindsOrion].[dbo].[customtablename]