Skip to content

Instantly share code, notes, and snippets.

@lamw
Last active July 10, 2019 21:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lamw/a744df89a5b8aab18c2b69af9399565b to your computer and use it in GitHub Desktop.
Save lamw/a744df89a5b8aab18c2b69af9399565b to your computer and use it in GitHub Desktop.
Add custom color to vSphere HTML5 UI Header/Footer in vSphere 6.7 Update 1
NEW_HEX_COLOR=632771
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war.bak
mkdir -p /root/TEST
cd /root/TEST
cp /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/h5ngc.war .
unzip h5ngc.war
rm -f h5ngc.war
cat << EOF >> resources/css/vghetto-custom.css
.main-nav HEADER{
background-color:#${NEW_HEX_COLOR} !important; }
bottom-panel toggle-splitter {
background: #${NEW_HEX_COLOR} !important; }
EOF
sed -i '/--%>/a \
\n <link href="resources/css/vghetto-custom.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/TEST
cp /root/h5ngc.war /usr/lib/vmware-vsphere-ui/plugin-packages/root-app/plugins/
service-control --stop vsphere-ui;service-control --start vsphere-ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment