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.

How to: Add a Classification Banner

SolarWinds customers have known for a long time that the power of the Orion products lie in the ability to customize almost everything. Product managers like myself always seek to identify and promote common alterations to become out of the box content, but at times you need things faster than we can release. One example is the ability to set a classification banner. Many of our federal customers have requirements for compliance e.g. Setup SSL and Enable Smart Card (CAC/PKI) User Authentication for Orion Web Console (Legacy) including setting login text and adding a global classification banner to the web console.

By following these steps, and with a little knowledge of css styling you can place a banner to meet your classification needs, before we standardize on an easy out of the box way to do so in a future release.

Please note that as always, custom code like this one isn't officially supported, thus if you upgrade or apply a hotfix, the configuration wizard will overwrite this change when updating the website. You'll simply want to have a copy of the changes on the side so you can reapply this customization after you finalize your upgrade. This is also why we have a reminder on our upgrade guide to back up custom code before you upgrade.

pastedImage_7.png

Step 1 : Create foo.js

Create a text document called foo.js. The content of this file will look like the following. This is where your css styling knowledge can come into play because I doubt you're looking to have an orange banner, so you'll want to switch out the text ("My Classification Banner") and change the style to what you're looking to add.

document.addEventListener('DOMContentLoaded',function(){
                window.$('#CustomBanner').append("<div class='sw-eval-mode' style='background-color:orange; position: relative; z-index: 1;text-align: center;'>My Classification Banner</div>")
}, false);

Step 2: Navigate to your InetPub directory

On my lab environment this is located in C:\inetpub, and the directory I'm interested in navigating to is: C:\inetpub\SolarWinds\Orion\js\OrionMinReqs.js

The contents of this directory should look like this:

pastedImage_0.png

Step 3: Copy foo.js to the OrionMinReqs.js directory and edit the bundler.config

pastedImage_2.png

The original bundler.config file should look similar to the following.

pastedImage_3.png

Add a line <file>foo.js</file> to the bottom of the list and save.

pastedImage_5.png

Step 4: Navigate to C:\inetpub\SolarWinds\ui\Views\Shared

pastedImage_3.png

Step 5: Edit _Layout.cshtml

In this file you'll be doing a Ctrl-F for  @if (displayHeaderAndFooter)

pastedImage_4.png

Remember that snippet of code in foo.js? Parse out the <div> part to be used in this file.

<div class='sw-eval-mode' style='background-color:orange; position: relative; z-index: 1;text-align: center;'>My Classification Banner</div>

The section will now look like you've added this code snippet in between the evaluation bar & the header

  @if (displayHeaderAndFooter)
    {
        <div id="swNavScroll" class="sw-page-header">
            @Html.Partial("~/Views/Shared/_EvalBar.cshtml", licenseData)
    <div class='sw-eval-mode' style='background-color:orange; position: relative; z-index: 1;text-align: center;'>My Classification Banner</div>
            @Html.Partial("~/Views/Shared/_Header.cshtml")
        </div>
    }

Save your file.

Step 6: Check your results

Here I'm looking at my License Manager to check my banner

pastedImage_10.png

And here I'm seeing it on my Settings page

pastedImage_12.png

It's also present on my Orion Summary Home page

pastedImage_0.png

And you're done! Classification banner added.

Disclaimer:

  • Unclassified:

    document.addEventListener('DOMContentLoaded',function(){ 

                    window.$('#CustomBanner').append("<div class='sw-eval-mode' style='background-color:green; position: relative; z-index: 1;text-align: center;'>UNCLASSIFIED</div>") 

    }, false); 

    Confidential:

    document.addEventListener('DOMContentLoaded',function(){ 

                    window.$('#CustomBanner').append("<div class='sw-eval-mode' style='background-color:blue; position: relative; z-index: 1;text-align: center;'>CONFIDENTIAL</div>") 

    }, false); 

    Secret:

    document.addEventListener('DOMContentLoaded',function(){ 

                    window.$('#CustomBanner').append("<div class='sw-eval-mode' style='background-color:red; position: relative; z-index: 1;text-align: center;'>SECRET</div>") 

    }, false); 

    Top Secret

    document.addEventListener('DOMContentLoaded',function(){ 

                    window.$('#CustomBanner').append("<div class='sw-eval-mode' style='background-color:yellow; position: relative; z-index: 1;text-align: center;'>TOP SECRET</div>") 

    }, false); 

    Preview:

    pastedImage_17.png

  • Thanks for this.  It's very helpful.  I implemented it but I'm seeing an odd behavior when I click logout.  The banner doesn't rise to the top.  How could we correct it so it looks normal for folks logging in with Username and password?

    20181106 - Issue with Banner Graphic.jpg

  • Is anyone able to confirm if this still works? I notice that the _Layout.cshtml isn't the same, and I've tried inserting something with no job

  •   I took a brief look over this and see that _Layout.cshtml is missing the referenced content. I will look into this further and see if there is an alternative method available.

  •  Have you been able to take a look at this? We were looking into implementing this feature until we realized the content references changed.

  •   This is still under investigation, from what I can tell so far a similar solution should be possible as <sw-evaluation-banner> is present on all classic orion pages with <div class="fdk-evaluation-banner"> on manage dashboards. Editing the innerhtml shows the classification banner. The question is where best, and how to inject this.

  •   Sharing what I have for now

    Following steps 1-3 only, and the following script for foo.js will display the banner with some limitations.

    document.addEventListener('DOMContentLoaded',function(){
    setTimeout(function(){
    var el = document.querySelector('sw-evaluation-banner');
    el.innerHTML="<div class='sw-eval-mode' style='background-color:orange; position: relative; z-index: 1;text-align: center;'>My Classification Banner</div>";
    }, 3000);
    }, false);

    Limitations: Does not work on pages such as Log Viewer, Manage Dashboards, Performance Analysis, My Orion Deployment

  • Proof this is still working in 2019.4. My use case is a little different but it does the job.

    dgsmith80_0-1607459526684.png

  •  Is that the Original unedited solution or did you modify it in any way?