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.
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:
Step 3: Copy foo.js to the OrionMinReqs.js directory and edit the bundler.config
The original bundler.config file should look similar to the following.
Add a line <file>foo.js</file> to the bottom of the list and save.
Step 4: Navigate to C:\inetpub\SolarWinds\ui\Views\Shared
Step 5: Edit _Layout.cshtml
In this file you'll be doing a Ctrl-F for @if (displayHeaderAndFooter)
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
And here I'm seeing it on my Settings page
It's also present on my Orion Summary Home page
And you're done! Classification banner added.
Disclaimer:
Please note, any custom scripts or other content posted herein are provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software that you have purchased from SolarWinds, and the information set forth herein may come from third party customers. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment. Any custom scripts obtained herein are provided to you “AS IS” without indemnification, support, or warranty of any kind, express or implied. You elect to utilize the custom scripts at your own risk, and you will be solely responsible for the incorporation of the same, if any.