Add a top banner to Hue!

Published on 26 March 2015 in Administration / Development - 2 minutes read - Last modified on 04 February 2020

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

23 June 2020
Monitoring Hue activity with Grafana Dashboards
Read More
22 June 2020
Automated checks for JavaScript modules compatible licenses and non absolute paths with Continuous Integration
Read More
19 May 2020
How to grant Ranger permissions for a new user on a Secure Cluster
Read More