Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add custom color to vSphere HTML5 UI Header/Footer in vSphere 6.7 Update 1
NEW_HEADER_HEX_COLOR=006400
NEW_BOTTOM_HEX_COLOR=8b0000
BACKUP_FILE=/usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war.bak
if [ ! -e ${BACKUP_FILE} ]; then
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war ${BACKUP_FILE}
fi
mkdir -p /root/work
cd /root/work
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war .
unzip h5ngc.war
rm -f h5ngc.war
cat << EOF >> resources/css/NotSupported_H5ClientHacks.css
.main-nav HEADER{
background-color:#${NEW_HEADER_HEX_COLOR} !important; }
bottom-panel toggle-splitter {
background: #${NEW_BOTTOM_HEX_COLOR} !important; }
EOF
sed -i '/--%>/a \
\n <link href="resources/css/NotSupported_H5ClientHacks.css" rel="stylesheet"/>' WEB-INF/views/index.jsp
zip -r /root/h5ngc.war config error.jsp locales META-INF notfound.jsp plugin.xml resources webconsole.html WEB-INF
cd /root
rm -rf /root/work
cp /root/h5ngc.war /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/
service-control --stop vsphere-ui; service-control --start vsphere-ui
NEW_HEADER_HEX_COLOR=812990
NEW_BOTTOM_HEX_COLOR=812990
BACKUP_FILE=/usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war.bak
if [ ! -e ${BACKUP_FILE} ]; then
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war ${BACKUP_FILE}
fi
mkdir -p /root/work
cd /root/work
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war .
unzip h5ngc.war
rm -f h5ngc.war
cat << EOF >> resources/css/NotSupported_H5ClientHacks.css
.main-nav HEADER{
background-color:#${NEW_HEADER_HEX_COLOR} !important; }
bottom-panel toggle-splitter {
background: #${NEW_BOTTOM_HEX_COLOR} !important; }
EOF
sed -i '/--%>/a \
\n <link href="resources/css/NotSupported_H5ClientHacks.css" rel="stylesheet"/>' WEB-INF/views/index.jsp
zip -r /root/h5ngc.war config error.jsp locales META-INF notfound.jsp plugin.xml resources webconsole.html WEB-INF
cd /root
rm -rf /root/work
cp /root/h5ngc.war /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/
service-control --stop vsphere-ui; service-control --start vsphere-ui
@gowatana

This comment has been minimized.

Copy link
Owner Author

commented Dec 1, 2018

下記の投稿むけ。

vCenter 6.7 u1 の HTML5 vSphere Client をクリスマス風にしてみる。
https://communities.vmware.com/people/gowatana/blog/2018/11/30/vcsa-html5-hack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.