Closed mohammedi-haroune closed 3 years ago
Thank you for noting this. To clarify, let me explain what happens on a regular JupyterHub (configured to serve at the root URL).
The relevant dashboard URLs are:
NEW: https://myjupyterhub.net/hub/dashboards-new
EDIT: https://myjupyterhub.net/hub/dashboards/
A built-in feature of JupyterHub is that it redirects otherwise-unknown URLs at / to /hub/.
So https://myjupyterhub.net/dashboards-static/components/jquery.easytabs.js redirects to https://myjupyterhub.net/hub/dashboards-static/components/jquery.easytabs.js
On the edit dashboard page, the relative URL to the static files is accurate. On the new dashboard page it is 'wrong' but gets redirected by JupyterHub.
So in fact the relative URL is no more 'correct' for a regular JupyterHub as it is for yours, but for some reason this redirect functionality isn't working on yours.
I'm not sure why, or whether that matters... I have changed the code in master to use {base_url} directly instead of the relative URL. This is more consistent with the other URLs used in the templates, and hopefully avoids your problem too.
The bug is fixed with the latest commit https://github.com/ideonate/cdsdashboards/commit/2792b165db0d5ed794d25547895509d07b2c4a4c. Thanks.
Hi, there's also a problem with the address a user is redirected to when accessing a dashboard. I believe this line should be changed to:
return self.redirect(url_path_join(self.settings["base_url"], "user", dashboard_user.name, dashboard.final_spawner.name))
Hi, there's also a problem with the address a user is redirected to when accessing a dashboard. I believe this line should be changed to:
return self.redirect(url_path_join(self.settings["base_url"], "user", dashboard_user.name, dashboard.final_spawner.name))
Yes, you're right. I had that a couple of times but I couldn't understand when it does happen
Thank you @wmalara and @mohammedi-haroune I've fixed these in 0.5.3, just released.
I know that the issue is closed, but I'm still seeing something similar in v.0.6.3. I'm trying to access a js in a folder called static at the root of my ipynb, the path is correctly loaded in the editor (and also in voilà, but only if my home server is running). When I look at the console, I see that the applet is looking for the path under /hub/static/path_to_the_js/. Is there a way to pack the static folder with the voila dashboard (like passing the --static flag to voila command line)?
Thanks.
Describe the bug
We have Jupyterhub under
/notebook/jupyter
in our MLOps platfor https://iko.ai/notebook/jupyter which causes this relative URL to point to a wrong URL and results in select elements not rendered properly, see the screenshot below https://github.com/ideonate/cdsdashboards/blob/8cb741f8bdd5cf143e95d004e9ece211ae1be479/share/cdsdashboards/templates-common/editdashboard.html#L238This only happens in the new dashboard page but not the edit page because the edit page URL is
notebook/jupyter/hub/dashboards/[APP_NAME]/edit
whereas the new page URL isnotebook/jupyter/hub/dashboards-new
../../dashboards-static/xxxxx
in the edit page will point tonotebook/jupyter/hub/dashboards-static/xxxxx
but it'll point tonotebook/dashboards-static/xxxxx
in the new dashboard page.To Reproduce
/notebook/jupyter
Screenshots
Configuration