Custom Node & Polling, Combined Details Resource

Version 1

    For a very long time, I have wanted to have very specific details, from various resources, all combined into a single resource.

    There have been numerous examples of custom modified resources, made available by the likes of Gob and hcy01uk, just to name a few.

     

    This is a custom resource that, as the title suggests, combines the standard "Node Details" resource, with the standard "Polling Details" resource.

    scottgille requested a custom resource to display a combination of both resources (How to create a resource that looks like this?), so I figured I would give it a shot, and see if I could make it happen.

     

    **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**



    The screenshot below, shows 2 rows of resources, spanned out across 3 columns.

    The 1st row shows the basic/default "Node Details" resource in the 1st column, my new, custom "MeowPolling" resource in the 2nd column, and the basic/default "Polling Details" in the 3rd column.

    My goal was to build scottgille's requested resource, combining the two default resources into a single resource, or, resource #621, as Scott says.

    Are you are asking why it says "MeowPolling" for the title? Well, as I was learning how the different parts worked, I wanted to make sure I did not get confused on a couple of things. I chose to call it MEOW so it stood out in the code, so I could learn where certain things would show up, or be referenced.

    You may change it as you see fit, as I will show you where, and tell you how.

    npm_custom_mod_resource_node_polling_details_combo-001.PNG

     

     

     

    The "Rar" file attached to this post should contain the following 2 files:

    ! !MeowPolling.ascx

    MeowPolling.ascx.cs

     

    Both of these files need to be placed in the following directory: (on your SolarWinds webserver)

    \inetpub\SolarWinds\Orion\NetPerfMon\Resources\NodeDetails\

     

    Now, again, I have not been trained on the proper ways to do these things. I know enough to figure out what breaks what, and what makes something else work. I do NOT know the technical definitions, actions, or purposes of any of this stuff. I usually just tinker with something until I can make it work for me. So, PLEASE, PLEASE, PLEASE, understand this, before you take anything I have said here, to the production floor.

     

    Having said that, everything here does, in fact, work for me, on our production server.

     

     

    Okay, so I am guessing you are going to want to change the name of this new resource.

    Here is how to do that.

     

    Let's first change the name of the two files: (we will use scottgille's example, "Customer Node Details")

    MeowPolling.ascx

    MeowPolling.ascx.cs

    to

    CustomerNodeDetails.ascx

    CustomerNodeDetails.ascx.cs

     

    The name of the files does not determine the name of the resource, as far as I know, however, I will keep them similar.

    After you have changed the file names, you will need to change the file names referenced within each file.

    To do this, simply open each file, and change the following:

    ".ascx" file:

    Change the contents of the first line, from this:

         <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MeowPolling.ascx.cs" Inherits="Orion_NetPerfMon_Resources_NodeDetails_MeowPolling" %>

    to this:

         <%@ Control Language="C#" AutoEventWireup="true" CodeFile="CustomerNodeDetails.ascx.cs" Inherits="Orion_NetPerfMon_Resources_NodeDetails_CustomerNodeDetails" %>

     

    Save the file, and open the other file to edit.

    ".ascx.cs" file:

    Change the contents of this line, from this:

         public partial class Orion_NetPerfMon_Resources_NodeDetails_MeowPolling : BaseResourceControl

    to this:

         public partial class Orion_NetPerfMon_Resources_NodeDetails_CustomerNodeDetails : BaseResourceControl

     

    Save the file, and you are done with everything related to changing the filenames.

     

     

    This section will tell you how to change the title of the resource. This is actually the title that shows up in the upper left corner of the resource, as it is seen on the page.

    You will need to open up the ".ascx.cs" file, and change the "DefaultTitle" section, towards the end/bottom of the file's contents.

     

    Find the section that looks like this:

    protected override string DefaultTitle

      {

      get { return "MeowPolling"; }

      }

     

    And change it to this:

    protected override string DefaultTitle

      {

      get { return "Customer Node Details"; }

      }

     

    Save the file, and you are done with everything related to changing the title of the resource.

     

     

    Now, copy your 2 files into the appropriate directory, as listed above.

    You will need to run the config wizard, on the webserver, but you will only need to select "website", NOT "database" or "services".

    This will rebuild your website resources, and include your new, custom, resource(s), along with your basic, default resources.

     

    As I was tinkering, testing, and learning, I discovered that it was easier to add a few copies of blank/default resources, to be modified later, as I would not have to rerun the config wizard again.

    So, I took my "MeowPolling" files, and made another copy of them.

    I changed the name of the files, as well as the resource title, as mentioned above.

    Now I have 2 copies of the exact same resource, with different names.

    I did this so the config wizard will add both new resources at the same time, preventing me from having to rerun the config wizard later, if I wanted to add another resource.

    You can edit the files, and your changes will be shown as soon as you save and reload the webpage.

    You only have to run the config wizard when you want to add a new resource. (as far as I know)

     

    npm_custom_mod_resource_node_polling_details_combo-002b.PNG

     

    After you have added both files into the "\inetpub\SolarWinds\Orion\NetPerfMon\Resources\NodeDetails\" directory, and successfully ran the config wizard (choosing "website" only), you should be able to add the new resources to your node details page.

     

     

    Hopefully this will help you to better understand how these resources work.

    Please do not break your system and blame it on me.

     

    Thank you,

     

    -Will