Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to add a simple HTML file to Hue

Highlighted

How to add a simple HTML file to Hue

Explorer

We want to put a simple .html file out on Hue's webserver so that it can be rendered.  I have tried putting the file in a couple of locations:

 

/opt/cloudera/parcels/CDH/lib/hue/build/

/opt/cloudera/parcels/CDH/lib/hue/build/static/

 

But when I go to https://<hue server>:8888/file.html it says Page Not Found

 

Any thoughts?

 

Thanks,

Brett

4 REPLIES 4
Highlighted

Re: How to add a simple HTML file to Hue

In dev version you can put it in
desktop/core/src/desktop/static/desktop/

then accessing:
http://127.0.0.1:8000/static/desktop/icon_hue_48.png

In your version you will need to run with the good permission something like

./build/env/bin/hue collectstatic

that way it shows up

Romain




Highlighted

Re: How to add a simple HTML file to Hue

Explorer

Hi Romain,

 

So I performed these steps and got this feedbacK:

 

[] /staging/cloudera/parcels/CDH-5.4.3-1.cdh5.4.3.p0.6/lib/hue/build/env/bin/> ./hue collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

/staging/cloudera/parcels/CDH-5.4.3-1.cdh5.4.3.p0.6/lib/hue/build/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
<Lists a bunch of files>

1 static file copied to '/staging/cloudera/parcels/CDH-5.4.3-1.cdh5.4.3.p0.6/lib/hue/build/static', 576 unmodified, 59 post-processed.

 

So the one static file I put in there is in the list above.  

 

Then I tried to go to:

 

https://<servernam:8888/<the file name>.html  

 

It was a Page Not Found. 

 

I tried restarting Hue and that didn't work either.  Thoughts?  

 

I am guessing it is a different URL path then I am inputting.

Re: How to add a simple HTML file to Hue

Cloudera Employee

Did you put your HTML in desktop/core/src/desktop/static/desktop/ ?

If yes then you can access it through https://<servername>:8888/static/desktop/<the file name>.html 

Highlighted

Re: How to add a simple HTML file to Hue

Explorer

I can see the <file>.html in the /staging/cloudera/parcels/CDH-5.4.3-1.cdh5.4.3.p0.6/lib/hue/build/static directory

 

When I run the collectstatic again, I see this at the end:

 

0 static files copied to '/staging/cloudera/parcels/CDH-5.4.3-1.cdh5.4.3.p0.6/lib/hue/build/static', 577 unmodified, 58 post-processed.

 

When I go to that URL location, I see the following message:

 

Page not found.

We're sorry, but the requested page could not be found: https://<server>:8888/static/desktop/<file>.html

Don't have an account?
Coming from Hortonworks? Activate your account here