Version 1

    This is a super simple, single file, single line, edit.

     

    ESTIMATED TIME TO INSTALL/PERFORM MODIFICATION: <1 Minute

     

    DIFFICULTY LEVEL:1-Youngling

    1. Youngling (Easiest/Most Basic; no coding experience required, no config wizard required, no system restart required, no system downtime.)
    2. Padawan (Easy/Basic; no coding experience required, possible config wizard required, possible system/services restart required, limited/no downtime.)
    3. Jedi Knight (Moderately Difficult/Advanced; some coding experience required/recommended, config wizard required, possible system/services restart required, limited/short duration downtime.)
    4. Jedi Master (Most Difficult/Advanced; advanced coding experience required, config wizard required, system/services restarts required, 30+ minutes downtime/maintenance window recommended, and other things that I do not even know I would need to know, required...)

     

     

    For all of those "tabbers", "shift-clickers", and "middle-button mashers" out there, that know the only way to truly use a tabbed browser, is to open so many tabs that you can even see the tabs anymore... this one is for you... And, of course, by you, I mean us...

     

    This simple little modification may have been mentioned elsewhere before, however, I was not fortunate enough to have found it before I figured out how to do it. So, if it has been mentioned before, well, here it is again...

     

    This modification will change the default behavior when clicking on a link within a SWQL Custom Query resource. (Any link, formed within the query, using the "_LinkFor_" alias.)

    By default, clicking on a link will load the link in the same page/tab as the source was in.

    The new behavior, after making this change, when clicking on a link, will load the link destination in a new tab/page, without the need to shift-click, or middle-mouse button click.

     

    THINGS TO KNOW:

    • I have countless SWQL Custom Query resources scattered throughout my SolarWinds environment.
    • I cannot stand directly clicking links, having them open in the same page/tab.
    • If I can still see the icons on the tabs of Chrome, then I must be sleeping.
    • I am a very inexperienced, and untrained, amateur (with the exception being all things Star Wars related, which does you absolutely no good here...)
      • Always backup your system/files BEFORE making any changes, and/or test with a demo/dev system before making changes to your production environment.
      • Please don't break your system, then blame it on me.
        • If you break your system, then blame it on me, please know, "I don't give a care...", "I told you so...", and/or "Nanna nanna boo boo, stick your head in doo doo..." will most likely be my response...

     

    **WARNING! THE INFORMATION YOU ARE ABOUT TO READ COMES FROM THE MIND OF AN UNTRAINED AMATEUR, AND IS MOST LIKELY FAR, FAR FROM THE BEST PRACTICE**

     

    Filename:

    CustomQuery.js

     

    File Location:

    \inetpub\SolarWinds\Orion\NetPerfMon\Resources\Misc\

     

    Open the file, and look for the line that has "if (cellInfo.linkColumn) {" (it should be on/around line 160)

    The change you will be making will need to be done on the next line, line 161.

     

    Change the RED part, of the line below,

                element = $('<a/>').attr('href', rowArray[cellInfo.linkColumn]);

     

    To match the GREEN part, of the line below,

                element = $('<a Target="_blank" />').attr('href', rowArray[cellInfo.linkColumn]);

     

    Save your file, and you are done!

     

    HERE IS HOW THE DEFAULT CODE LOOKS, BEFORE ANY CHANGES:

            var element;
            if (cellInfo.linkColumn) {
                element = $('<a/>').attr('href', rowArray[cellInfo.linkColumn]);
            } else {
                element = $('<span/>');
            }
    
    
    
    
    
    
    

     

     

    AND HERE IS HOW THE CODE SHOULD LOOK AFTER YOUR CHANGE:

            var element;
            if (cellInfo.linkColumn) {
                element = $('<a Target="_blank" />').attr('href', rowArray[cellInfo.linkColumn]);
            } else {
                element = $('<span/>');
            }
    
    
    
    
    
    
    
    

     

     

    Now, you should be able to use the "_LinkFor_" column alias in your SWQL query, on a Custom Query resource, and when you click the link, on the query results, it should, by default, automatically open in a new tab/window.

     

    If you have any questions, or comments, please leave them below, and I will do my best to follow up with you.

     

    Thank you,

     

    -Will

     

    --If you are interested in customizing, and/or modifying your SolarWinds environment, CourtesyIT has put together a terrific "Page of Pages" (PoP), "List of Links" (LoL), okay, you get the idea... Please visit his page, How to do various customizations with your Solarwinds, and discover a better way to enhance your SolarWinds environment. Make sure to bookmark, like, and rate his page, as it will help you, as well as others after you.