Debian Codegraph @

jupyter_server/templates/login.html

raw
1 {% extends "page.html" %}
2
3
4 {% block stylesheet %}
5 {% endblock %}
6
7 {% block site %}
8
9 <div id="jupyter-main-app" class="container">
10 {% if login_available %}
11 {# login_available means password-login is allowed. Show the form. #}
12 <div class="row">
13 <div class="navbar col-sm-8">
14 <div class="navbar-inner">
15 <div class="container">
16 <div class="center-nav">
17 <form action="{{base_url}}login?next={{next}}" method="post" class="navbar-form pull-left">
18 {{ xsrf_form_html() | safe }}
19 {% if token_available %}
20 <label for="password_input"><strong>{% trans %}Password or token:{% endtrans
21 %}</strong></label>
22 {% else %}
23 <label for="password_input"><strong>{% trans %}Password:{% endtrans %}</strong></label>
24 {% endif %}
25 <input type="password" name="password" id="password_input" class="form-control">
26 <button type="submit" class="btn btn-default" id="login_submit">{% trans %}Log in{% endtrans
27 %}</button>
28 </form>
29 </div>
30 </div>
31 </div>
32 </div>
33 </div>
34 {% else %}
35 <p>{% trans %}No login available, you shouldn't be seeing this page.{% endtrans %}</p>
36 {% endif %}
37 {% if message %}
38 <div class="row">
39 {% for key in message %}
40 <div class="message {{key}}">
41 {{message[key]}}
42 </div>
43 {% endfor %}
44 </div>
45 {% endif %}
46 {% if token_available %}
47 {% block token_message %}
48 <div class="col-sm-6 col-sm-offset-3 text-left rendered_html">
49 <h3>
50 Token authentication is enabled
51 </h3>
52 <p>
53 If no password has been configured, you need to open the
54 server with its login token in the URL, or paste it above.
55 This requirement will be lifted if you
56 <b><a href='https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html'>
57 enable a password</a></b>.
58 </p>
59 <p>
60 The command:
61 <pre>jupyter server list</pre>
62 will show you the URLs of running servers with their tokens,
63 which you can copy and paste into your browser. For example:
64 </p>
65 <pre>Currently running servers:
66 http://localhost:8888/?token=c8de56fa... :: /Users/you/notebooks
67 </pre>
68 <p>
69 or you can paste just the token value into the password field on this
70 page.
71 </p>
72 <p>
73 See
74 <b><a href='https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html'>
75 the documentation on how to enable a password</a>
76 </b>
77 in place of token authentication,
78 if you would like to avoid dealing with random tokens.
79 </p>
80 <p>
81 Cookies are required for authenticated access to the Jupyter server.
82 </p>
83 {% if allow_password_change %}
84 <h3>{% trans %}Setup a Password{% endtrans %}</h3>
85 <p> You can also setup a password by entering your token and a new password
86 on the fields below:</p>
87 <form action="{{base_url}}login?next={{next}}" method="post" class="">
88 {{ xsrf_form_html() | safe }}
89 <div class="form-group">
90 <label for="token_input">
91 <h4>Token</h4>
92 </label>
93 <input type="password" name="password" id="token_input" class="form-control">
94 </div>
95 <div class="form-group">
96 <label for="new_password_input">
97 <h4>New Password</h4>
98 </label>
99 <input type="password" name="new_password" id="new_password_input" class="form-control" required>
100 </div>
101 <div class="form-group">
102 <button type="submit" class="btn btn-default" id="login_new_pass_submit">{% trans %}Log in and set new
103 password{% endtrans %}</button>
104 </div>
105 </form>
106 {% endif %}
107
108 </div>
109 {% endblock token_message %}
110 {% endif %}
111 </div>
112
113 {% endblock %}
114
115
116 {% block script %}
117 {% endblock %}