Version 5

    **Please visit, read, download, and install the new custom resource that implements hcy01uk's workaround directly into the resource header.**

    **          Custom SWQL Views Manager Resource          **

    **     **

    **If you are going to use the new resource, or the database workaround, you can remove the following 3 lines from the main query, as well as the search query**

    **     **

    'AddNew' AS AddNewView,

    '/Orion/Admin/AddView.aspx?ReturnTo=' AS [_LinkFor_AddNewView],

    '/Orion/Nodes/images/icons/icon_add.gif' AS [_IconFor_AddNewView],

    **     **

    **     **



    Let me start by saying I am at the bottom of the SWQL code pool.  I am completely aware that I do not fully understand, nor do I know, what I am doing.  This is most likely not the best way to do this, however, I have needed something like this for a long time now, and this works for me.

     

    For many moons now, I have been waiting and looking for a better way to manage our views. Over the years, we have gathered hundreds of views, yet the way we manage them has never properly compensated for that growth.  I find it to be somewhat of a chore to go through and manage all of these views.  Finally, I decided to just find a way to make it work better, for me.  It is not the best.  It is not proper. It is most likely far from anything that would/should resemble an actual solution.  Having said that, and once again, it works for me... for now.

     

    This is a simple SWQL query that lists all of the views.  It provides links to view or edit each view.  There is even a link to add a new view.

     

     

    I have not yet been trained in the dark art of making urls, within SWQL, automatically open in a new tab... So... I just keep it analog, and use my middle mouse button to click all my links here.

    I have figured out a simple way to change the default behavior of SWQL links that use the "_LinkFor_" column alias.

    Please follow the link below to read how to "fix" this behavior.

    Make ALL Links, In A SWQL Custom Query Resource, Open In New Tabs By Default

     

     

    Also, I would love to be able to add little "widget" type icons/buttons in the title bar space of the resource. Since I am also lacking that level of knowledge, and probably commitment too, I simply went ahead and added an "AddNew" icon/button/link on each row.

     

    The "AddNewView" column simply shows an icon/link, for each and every row, that creates a new page/view.  It has nothing to do with anything on any row, and will not link anything on any row to anything else.  Every "AddNew" icon/link is for the exact same thing, goes to the exact same place, and starts the exact same process.

     

    The "Edit" column shows an "Edit" button, which simply takes you to the edit page of the view on the same row.  This icon/link is directly related to the row it is located on. This would provide the same results as manually going to a page, and then clicking the "Customize Page" link located in the upper righthand corner.

     

    The "ViewTitle" column provides the value of the page, as well as a link to view the page.  Clicking this link will simply open the view. (Also, clicking on the "ViewID" field of a row will take you straight to that view/page.)

     

    The search option should allow you to search by the following fields: ViewID, ViewKey, ViewTitle, ViewGroupName, & ViewType

    npm_swql_custom_views_manager-001.PNG

    As far as I know, users will still need permissions to manage views, as well as access/permissions to view the results of this query/resource. Otherwise, they should get an error, and/or not even be able to see the results of the query.

     

     

    You will need to add the “Custom Query” resource to the page/view you want this on.

    Then, you will need to edit the “Custom Query” resource and copy the contents of the "SWQL_Custom_Views_Manager.txt" file into both sections.

    The first section only needs everything before the "WHERE" clause of the query.

    The second section, the search section, requires the entire query.

    npm_swql_custom_views_manager-002.PNG

     

     

     

    Again, I already know this is not the best way, and probably not the right way... but it works for me.

     

    Hopefully, this can help someone else out too, at least until SolarWinds finishes those upgrades on the basics...

     

     

    Thank you,

     

    -Will