IS there any way to add a clickable link on a custom resource like we can embed into reports?
this is a major hurdle for me switching and adopting custom resources and swis more fully.
Linking objects displayed in the Custom Query Resource to their respective pages is certainly possible. Below is such an example.
--BEGIN CODE--Resource object used: Custom Query Object Resource --Resource Location: Miscellaneous -> Custom Query--View(s) using this: PLACE VIEW NAMES HERE--Select DB columns and hyperlink fieldsSELECT a.ObjectName, a.TriggerTimeStamp,a.AcknowledgedBy, a.AcknowledgedTime,a.Notes, n.DetailsUrl AS [_LinkFor_ObjectName], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_ObjectName],'/Orion/NetPerfMon/Alerts.aspx?NetObject=N%3a' + ToString(a.ActiveObject) AS [_LinkFor_TriggerTimeStamp]FROM Orion.AlertStatus aJOIN Orion.NodesCustomProperties c ON c.NodeID = a.ActiveObject AND a.ObjectType = 'Node'JOIN Orion.Nodes n ON n.NodeID = c.NodeID--Filter Info--Define NOC center--NOC center options are listed under GEO custom properties--Sort by (Date)ORDER BY a.TriggerTimeStamp DESC--END CODE
I Thought I tried URL but might have gotten uri. Thanks
aLTeReGo,
I recreated your script for my needs and after realizing I needed to add + '.gif' it all came together - thanks!
Is there anyway to add Tool tips functionality?
SELECT a.DisplayName as Application, n.caption as Node,a.DetailsUrl AS [_LinkFor_Application], '/Orion/images/StatusIcons/Small-' + a.StatusDescription + '.gif' AS [_IconFor_Application],'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.nodeid) AS [_LinkFor_Node]
FROM Orion.APM.Application a
join orion.nodes n on n.nodeid=a.nodeid
join orion.containermembers m on a.nodeid=m.memberprimaryid
join orion.container c on m.containerid=c.containerid
where c.name = '${caption}'
ORDER BY a.status DESC
Tool Tips should be automatic, but are not. It seems this stopped working with the NPM 10.4 release. We've logged this as a bug internally to be addressed. Thank you for bringing this to our attention.
Links, tooltips and search
the only thing left on my wish list is swis access to views vs just tables assuming the indexing would increase performance on query heavy pages?
Some SWIS entities are based on SQL views already. Is there something in particular you have in mind?
As I build more custom queries I'll post any that are expensive queries.
In the meantime, can I audit my above wish list in that exporting out of a Custom Query (much like we do with reports using "…&dataformat=xls") would be paramount for making these better audit and reporting tools. I don't see reports as useful without the ability to search within them...
The Custom Query resource does not have export capability, but if you can write a SWQL query to get the data you want it is not hard to get a .csv file through other methods. You can use SWQL Studio (right-click on the results/data grid pane and choose Save Results As...) or PowerShell (Get-SwisData $swis "SELECT foo FROM bar" | Export-Csv results.csv).
Hi aLTeReGo,
Can you please also help here if I want the values of the column 'node caption' clickable, thus, taking to the node's details page.
Also, if you could help with the below? How is it working ? Does this work with the 'custom tabel' resource on a view
n.DetailsUrl AS [_LinkFor_ObjectName], '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_ObjectName],'/Orion/NetPerfMon/Alerts.aspx?NetObject=N%3a' + ToString(a.ActiveObject) AS [_LinkFor_TriggerTimeStamp]