You manage multiple development, test and production domains through their particular Administration Console. Although you defined all your domains in production mode, you notice that sometimes you make changes in the wrong console (e.g. development changes in a production environment) because of time pressure and a lack of attention by yourself. Oops... Well, another nice advice is to implement console extensions in your Administration Console, e.g. especially for the real production environments.
Solution
You can change the login page and some colors in the console itself to accentuate the production environment.
I tested this out on a Windows Server 2008 machine.
Normally, when you navigate to your Administration Console, you see this screen:
In the console itself, you have always a light blue toolbar (Home | Log Out | Preferences | ...) and after executing an action, you see thereunder a light gray message box:
Now, we will change a bit this layout.
(1)
Open a MS-DOS session and execute the setDomainEnv.cmd script from your domain.
(2)
Go to the templates directory for the console extensions:
cd %WL_HOME%\server\lib\console-ext\templates
Here, you will normally find 2 files:
build-new-laf.xml
laftemplate.zip
Execute this command to create an exploded format of your console extensions war-file:
ant -f build-new-laf.xml -Dname=myConsoleExt -Ddir=C:\myConsoleExt
(3)
In the WEB-INF subdirectory, create a classes directory, go to this new directory and create global.properties file by executing this command:
jar -xf %WL_HOME%\server\lib\consoleapp\webapp\WEB-INF\lib\console.jar global.properties
(4)
When you open this file in a text editor, you can see here all the labels, titles etc that are displayed in the console.
For the login page, for example, we want to change the subtitle of the login box from "Log in to work with the WebLogic Server domain" to "Log in to this PRODUCTION domain".
In the global.properties locate this line:
login.welcome2=Log in to work with the WebLogic Server domain
And change it to:
login.welcome2=Log in to this PRODUCTION domain
(5)
To change the colors in the console, we are going to modify a stylesheet.
Locate this stylesheet:
C:\myConsoleExt\css\content.css
In the ".toolbar"-tag, change the property value for "background-color" from "#D2E5F9" to "#FF0000".
In the ".messagesbox"-tag, change the property value for "background-color" from "#F6F6F6" to "#00FFFF".
(6)
Create a war from the exploded directory.
cd C:\myConsoleExt
jar -cf myConsoleExt.war *
And move the war-file to the console-ext directory of your domain:
move myConsoleExt.war %LONG_DOMAIN_HOME%\console-ext\
On the server restart the administration server.
When this is done, restart your browser or clean the browser history on the client pc.
(7)
Test now your new Administration Console look and feel!
No comments:
Post a Comment