Saturday, November 17, 2012

Look and feel of Tibco Administrator based on environment



When working with a lot of different environments, it is always good to be able to differentiate between all of them by just having a quick look at it. TIBCO Administrator is a great tool when you need to make some visual health check of a specific application or even for the full system. It becomes however difficult when you need to do that under stressful pressure because the production application does not behave the way it was in staging. You then start looking at the possible issues in the logs, global variables or even in the process definitions stats. After a few switches back and forth between staging and production, you start confusing the two of them. This task becomes even more difficult when you have your localhost running, plus the development environment as well as UAT server. You are not however without any help. You can check for the domain name in the top right corner. If your environments are setup properly, you should have different domain name allocated for each of them.

A TIBCO Administrator interface is running JSP pages on a Tomcat instance. It is therefore possible to change some of the images or style of the pages. The following steps will help you to change the heading logo as well as the right hand side menu for each environment.

1) The first step is to create the logos.
I've created some logos using the existing TIBCO Administrator images and adapting to my preferences. The size of the file must be 366x48 and saved as GIF (without changing too many the pages).





You also need filler for the rest of the page. The file size must be 1x48 and saved as GIF (without changing too many the pages).




2) Once you have your images, connect to the server where TIBCO Administrator is installed and go to the following location:
%TIBCO_HOME%\administrator\5.x\tomcat\webapps\administrator\jsp\com\tibco\administrator\ApplicationHeaderPaneUI\

3) Rename the current images as backup:
sculpted_logo.gif --> sculpted_logo.gif.bak
tiled_banner.gif --> tiled_banner.gif.bak

4) Copy the new images and rename them to the proper name:
sculpted_logo_[env].gif --> sculpted_logo.gif
tiled_banner_[env].gif --> tiled_banner.gif

5) At this point, you can already check the result. (Don't forget to clear the cache for this server otherwise Tomcat will cache the old images)


6) Now for the left hand side menu. Go and edit the file located in:
%TIBCO_HOME%\administrator\5.x\tomcat\webapps\administrator\jsp\com\tibco\administrator\ConsoleSelectorPaneUI.jsp

7) Around the line 10, you will have the colour used for the frame background (bgcolor="#FFFFFF" currently white). Replace it with the same colour as the one you used for your logo.
In my case, for Localhost:
bgcolor="#FFFFFF" --> bgcolor="#ff8328"
for Staging:
bgcolor="#FFFFFF" --> bgcolor="#c9ffbf"
for Production:
bgcolor="#FFFFFF" --> bgcolor="#285bff"

8) Save the file and just refresh the page to see the modification.

Reference:
Thanks to Ben's Blog for the above content:
http://b.amiot.free.fr/comments.php?y=10&m=03&entry=entry100303-033107