Add a top banner to Hue!

Published on 26 March 2015 in Development - 2 minutes read - Last modified on 19 April 2021

We have already seen in this post how you can configure Hue in your cluster. But did you know that there’s a property that can make a top banner appear in your Hue installation? This is quite useful if you want for instance to show a disclaimer to your users, or to clearly mark a testing or production environment, or if you want to display some dynamic information there. Depending on if you are using Cloudera Manager or not, you should either add a safety valve or edit a .ini file to use this feature. For details on how to change the configuration, read here. In the desktop/custom section of the ini file you can find the banner_top_html property:

[desktop]

[[custom]]

\# Top banner HTML code

banner_top_html=

Then it’s just a matter of writing some HTML/CSS and even Javascript code to customized it as you prefer. Keep in mind that you have a limited height to do that (30px). For instance, to write a the same message you see on demo.gethue.com, you can write this:

[desktop]

[[custom]]

\# Top banner HTML code

banner_top_html='
This is Hue 3.11 read-only demo - Read more about it or open a sample query!
'
Or we could even use a very old HTML tag to display a running ticker!
[desktop]

[[custom]]

\# Top banner HTML code

banner_top_html='Welcome to the test environment.'

.

Pretty cool, uh? Now it’s your turn to create something useful with it! As usual feel free to comment on the hue-user list or @gethue!


comments powered by Disqus

More recent stories

26 June 2024
Integrating Trino Editor in Hue: Supporting Data Mesh and SQL Federation
Read More
03 May 2023
Discover the power of Apache Ozone using the Hue File Browser
Read More