FYI here is my first pass attempt. It works but relies on parsing the URL
in the notebook to get the username. I think this might be a bit brittle
but it works for a first pass
1. On the hub server, create a custom.js file with the following in its
contents
var username = (""+ window.location).split('/')[4];
$('#logout').html( "Logout " + username)
2. Mount the directory containing it to the appropriate location for it to
be picked up by the single-user jupyter server running in the docker
container
c.DockerSpawner.volumes = {
'<PATH TO DIRECTORY WITH custom.js ON HUB
SERVER>':'/opt/conda/lib/python3.5/site-packages/notebook/static/custom',
}
3. Restart your docker container and/or hub if necessary (i.e. it reuses
old docker containers so if you did not have the volumes param when it was
created you have to remove it to have it added in. Also the spawner only
reads the config at startup so the same applies there.
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/769922d9-f3f4-4b9f-86ac-9a3021a4b5c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.