Question
· Apr 25, 2018

Customizing Management Portal Header

Good day,

Is there a way to change the theme in management portal? or at least the color of the header.

Issue is, some users have access to Development and Testing and Production environments. I would like a way to color-differentiate the environments to reduce the errors. 

Discussion (12)3
Log in or sign up to continue

As an unsupported, inelegant, and prone to break hack!, we've amended one of the standard CSS pages for our HealthShare 2018 installation:

    ZEN_Component__core_3.css

(for Windows, located in <InstallPath>\CSP\broker )

Just added a background colour as follows for our live server:

Doesn't display on every page but does on important pages for us like SQL, lookup tables, configuration pages:

.zendiv {

                background: #FFE0E0;

}

I've cobbled together a little TamperMonkey/GreaseMonkey script that diddles with the style sheet without having to make unsupported changes to your installation's configuration. Adust the devattr, qaattr and prdattr variables to suit your color tastes, and the match arguments for the hostnames to identify your servers.

// ==UserScript==

// @name         Management Console Banner

// @namespace    http://tampermonkey.net/

// @version      0.2

// @description  Seems to work for both Chrome and Firefox

// @author       Jeff Drumm, HICG LLC

// @include      *://*/csp/sys*

// @include      *://*/csp/healthshare*

// @grant        none

// ==/UserScript==

function addGlobalStyle(css) {

    var head, style;

  head = document.getElementsByTagName('head')[0];

    if (!head) { return; }

  style = document.createElement('style');

  style.type = 'text/css';

  style.innerHTML = css;

  head.appendChild(style);

}

var devattr = 'color-stop(0.0,rgb(95, 246, 18)), color-stop(0.5,rgb(20, 204, 51)), color-stop(1.0,rgb(232, 227, 226))'

var qaattr = 'color-stop(0.0,rgb(248, 252, 10)), color-stop(0.5,rgb(204, 199, 20)), color-stop(1.0,rgb(232, 227, 226))'

var prdattr = 'color-stop(0.0,rgb(255, 2, 49)), color-stop(0.5,rgb(204, 18, 18)), color-stop(1.0,rgb(232, 227, 226))'

var curattr = ''

if (window.location.hostname.match('^ensprod.*')) {

    curattr = prdattr;

} else if (window.location.hostname.match('^ensqa.*')) {

    curattr = qaattr;

} else {

    curattr = devattr;

}

addGlobalStyle('.portalTitle { background: -webkit-gradient(linear, left top, left bottom, ' + curattr + ') !important; } ');

Hi all,

I've created a browser extension that changes the header colour to make it obvious which environment you're in

It also organises the environment tabs into tab groups to keep the environments all together ('environments' referred to as 'instances' throughout my extensions docs!)

If you find it helpful, I'd really appreciate it if you voted for it in the Intersystems Grand Prix competition

 
* I actually came across this post when I was first trying to sort this problem for myself and it was @Jeffrey Drumm 's suggestion about
 TamperMonkey/GreaseMonkey that gave me the idea for a browser extension to do this, thanks Jeffrey