File tree Expand file tree Collapse file tree 2 files changed +28
-9
lines changed
Expand file tree Collapse file tree 2 files changed +28
-9
lines changed Original file line number Diff line number Diff line change 1+ """
2+ jupyterhub_config purely used for testing changes to templates.
3+
4+ See README.md for information on how to test this out.
5+ """
16import pathlib
27from oauthenticator .generic import GenericOAuthenticator
38from jupyterhub .spawner import SimpleLocalProcessSpawner
49
510
6- c .JupyterHub .spawner_class = SimpleLocalProcessSpawner
7-
811HERE = pathlib .Path (__file__ ).parent
912
13+ # Add templates from our local checkout to the path JupyterHub searches
14+ # This allows us to override any template present in upstream
15+ # jupyterhub (https://github.com/jupyterhub/jupyterhub/tree/main/share/jupyterhub/templates)
16+ # locally
1017c .JupyterHub .template_paths = [str (HERE / 'templates' )]
1118
19+ # We use this so we can get a 'login' button, instead of a username / password
20+ # field.
1221c .JupyterHub .authenticator_class = GenericOAuthenticator
1322
14- c .Authenticator .admin_users = [
15- 'yuvipanda'
16- ]
17-
23+ # Variables that are passed through to templates!
1824c .JupyterHub .template_vars = {
1925 'custom' : {
2026 "interface_selector" : True ,
27+ "default_url" : "/rstudio" ,
2128 'org' : {
2229 'name' : 'University of Foo' ,
2330 'logo_url' : 'https://jupyter.org/assets/nav_logo.svg' ,
Original file line number Diff line number Diff line change 3434 < div class ="form-group interface-selector ">
3535 < label > After logging in, open: </ label >
3636 < label class ="radio-inline ">
37- < input type ="radio " name ="interface " value ="tree " checked > Jupyter Notebook
37+ < input type ="radio " name ="interface " value ="tree "
38+ {% if "default_url" not in custom or custom["default_url"] == "/tree " %}
39+ checked
40+ {% endif %}
41+ > Jupyter Notebook
3842 </ label >
3943 < label class ="radio-inline ">
40- < input type ="radio " name ="interface " value ="rstudio "> RStudio
44+ < input type ="radio " name ="interface " value ="rstudio "
45+ {% if "default_url" in custom and custom["default_url"] == "/rstudio " %}
46+ checked
47+ {% endif %}
48+ > RStudio
4149 </ label >
4250 < label class ="radio-inline ">
43- < input type ="radio " name ="interface " value ="lab "> JupyterLab
51+ < input type ="radio " name ="interface " value ="lab "
52+ {% if "default_url" in custom and custom["default_url"] == "/lab " %}
53+ checked
54+ {% endif %}
55+ > JupyterLab
4456 </ label >
4557 </ div >
4658 </ form >
You can’t perform that action at this time.
0 commit comments