Yes, you can configure the custom colouring for admin console by using myst
Create a plain text
file in myst custom action
name:console-style
location:console-style.sh
content:
#!/bin/bash
FMW_HOME=$1
if [ -z "" ]; then
FMW_HOME=/u01/app/oracle/product/fmw1221
fi
BORDER_COLOUR=$2
if [ -z "$BORDER_COLOUR" ]; then
BORDER_COLOUR="red"
fi
echo "Backing up general.css and console.css"
CSS=$FMW_HOME/wlserver/server/lib/consoleapp/webapp/framework/skins/wlsconsole/css
cp $CSS/general.css{,.`date +%Y%m%d-%H%M%S`}
cp $CSS/console.css{,.`date +%Y%m%d-%H%M%S`}
echo "Adding Production styling to console.css"
cat <<EOT >> $CSS/console.css
#product-brand-name:before {
background-color: $BORDER_COLOUR;
content: "PRODUCTION";
font-size: large;
margin-right: 20px;
padding: 35px;
}
EOT
echo "Adding border colour"
sed -i "/background-color: #FFFFFF;/a \ \ \ \ border: 8px solid $BORDER_COLOUR;" $CSS/general.css
exit 0
Create a Jython Action
in the myst custom action
name: console-style
location: console-style.py
content:
from com.rubiconred.myst.util import SSHUtil
"""
####
#Description
####
Updates ofmw CSS
Follows steps from
https://david-kerwick.github.io/2014-03-31-customise-skin-of-weblogic-admin-console/
####
#Dependencies
####
Myst custom action created as plain text file:
console-style.sh
#!/bin/bash
FMW_HOME=$1
if [ -z "" ]; then
FMW_HOME=/u01/app/oracle/product/fmw1221
fi
BORDER_COLOUR=$2
if [ -z "$BORDER_COLOUR" ]; then
BORDER_COLOUR="red"
fi
echo "Backing up general.css and console.css"
CSS=$FMW_HOME/wlserver/server/lib/consoleapp/webapp/framework/skins/wlsconsole/css
cp $CSS/general.css{,.`date +%Y%m%d-%H%M%S`}
cp $CSS/console.css{,.`date +%Y%m%d-%H%M%S`}
echo "Adding Production styling to console.css"
cat <<EOT >> $CSS/console.css
#product-brand-name:before {
background-color: $BORDER_COLOUR;
content: "PRODUCTION";
font-size: large;
margin-right: 20px;
padding: 35px;
}
EOT
echo "Adding border colour"
sed -i "/background-color: #FFFFFF;/a \ \ \ \ border: 8px solid $BORDER_COLOUR;" $CSS/general.css
exit 0
"""
def myst(cfg):
fmw_home = cfg.getProperty('core.fmw.home')
border_colour = cfg.getProperty('custom.vf.border_colour')
if border_colour is None:
border_colour = ''
# Copy console-style.sh to each node
nodes = cfg.getProperty('nodes')
for node in nodes.split(','):
machineId = cfg.getProperty('core.domain.machine[' + node + '].node-id')
nodeName = cfg.getProperty('core.node[' + machineId + '].name')
LOG.info('Running on: ' + nodeName)
LOG.info(' /tmp/console-style.sh ' + fmw_home + ' ' + border_colour)
SSHUtil.copyFileToNode(machineId, cfg.getProperty('myst.workspace') + '/resources/custom/console-style.sh', '/tmp/', 1);
SSHUtil.executeCommandOnNode(machineId, 'chmod u+x /tmp/console-style.sh && /tmp/console-style.sh ' + fmw_home + ' ' + border_colour, 0)
update
actioncustom
then choose console-style
Execute