This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Importing DetailsUrl as a Details Page Link with Tooltip into a Custom Table

This can be easily accomplished as long as the field is named DetailsUrl within the query. In the following example the DetailsUrl is actually named EntityDetailsUrl and will not allow the selection of a Details Page Link. 

This query returns all unacknowledged alerts. I was able to reference the Node DetailsURL by creating a JOIN to the node table from the AlertObjects table using the RelatedNodeCaption and this allowed the Detail Page Link to be displayed. Does anyone have an idea of how to include the EntityDetailsUrl. 

SELECT DISTINCT Node.Caption AS Node, Node.DetailsUrl AS NodeDetails, AlertObjects.EntityCaption AS Entity, AlertObjects.EntityDetailsUrl AS EntityDetails, AlertConfigurations.Name AS ALERT, AlertActive.TriggeredMessage AS Message
FROM Orion.AlertObjects AlertObjects
JOIN Orion.AlertActive AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID
JOIN Orion.AlertConfigurations AlertConfigurations ON AlertConfigurations.AlertID=AlertObjects.AlertID
JOIN Orion.Nodes Node ON Node.Caption=AlertObjects.RelatedNodeCaption
WHERE (AlertActive.Acknowledged is Null OR AlertActive.Acknowledged = 'False')
This Datasource allowed the Node to be displayed with the Details Page Link
I was able to get the entity displayed this way for interfaces by creating a JOIN to the Interface table on the EntityDetailsUrl, however this filtered the query to only display alerts where the entity is an interface. 
SELECT DISTINCT Node.Caption AS Node, Node.DetailsUrl AS NodeDetails, Interfaces.Caption AS Interface, Interfaces.DetailsUrl AS InterfaceDetails, AlertConfigurations.Name AS ALERT, AlertActive.TriggeredMessage AS Message FROM Orion.AlertObjects AlertObjects
JOIN Orion.AlertActive AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID  
JOIN Orion.AlertConfigurations AlertConfigurations ON AlertConfigurations.AlertID=AlertObjects.AlertID
JOIN Orion.Nodes Node ON Node.Caption=AlertObjects.RelatedNodeCaption
JOIN Orion.NPM.Interfaces Interfaces ON Interfaces.DetailsUrl = AlertObjects.EntityDetailsUrl
WHERE (AlertActive.Acknowledged is Null OR AlertActive.Acknowledged = 'False')
Any ideas????
Parents Reply Children
  • Sorry - read too fast - need more Coffee.  Yes, you just need to honor the standard HTML tagging syntax.  There are some people that have done some amazing things with custom HTML within query widgets.  Honestly, I only know enough HTML and CSS to be dangerous, so I defer to smarter people when they want things 'pretty.'

  • OK, attached is some code for the entity field of an alert display. The code displays the html correctly within a Custom Table Widget but does not within a Custom Query Widget. Do yo see what I'm missing to get it working within a Custom Query Widget?

    CASE
    WHEN AlertObjects.EntityType = 'Orion.Groups'
    THEN CONCAT('<b>Group</b> <a href="', AlertObjects.EntityDetailsUrl, '">', AlertObjects.EntityCaption, '</a>')
    WHEN AlertObjects.RelatedNodeCaption IS NULL OR AlertObjects.RelatedNodeCaption = AlertObjects.EntityCaption
    THEN CONCAT('<a href="', AlertObjects.EntityDetailsUrl, '">', AlertObjects.EntityCaption, '</a>')
    WHEN AlertObjects.RelatedNodeCaption != AlertObjects.EntityCaption
    THEN CONCAT('<a href="', AlertObjects.EntityDetailsUrl, '">', AlertObjects.EntityCaption, ' <b>on</b> ', '<a href="', AlertObjects.RelatedNodeDetailsUrl, '">', AlertObjects.RelatedNodeCaption, '</a></a>')
    ELSE 'Not Defined'
    END AS Entity,
  • This maybe a better way of asking .....

    I know this works. 

    SELECT 'Hello World' as hello, '/Orion/SummaryView.aspx?ViewID=1' as _LinkFor_hello
    FROM Orion.Sites

    What is the syntax to include html inline within a Custom Query Widget?

    This doesn't work......

    SELECT '<a href="/Orion/SummaryView.aspx?ViewID=1">Hello World</a>' as hello
    FROM Orion.Sites
  • You are correct. Face palm I got my lines crossed.  "Raw" HTML is not supported in the Custom Query Widget, only the custom table editor (part of the reporting engine).

  • Thanks, I was hoping it could be done though.