-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Downgrade hub * Adapt to hub 4.x * Fix indent * Add admin template * Linting fixes * Add some padding to make footer fixed * Fix footer, next attempt Using solution from https://stackoverflow.com/a/62009670 * Fix announcement
- Loading branch information
Showing
14 changed files
with
431 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- htmlhint doctype-first:false,id-class-value:false --> | ||
{% extends "page.html" %} | ||
|
||
{% block main %} | ||
<div class="ecl-container ecl-u-mv-xl container-fix"> | ||
<div id="react-admin-hook"> | ||
<script id="jupyterhub-admin-config"> | ||
window.api_page_limit = parseInt("{{ api_page_limit|safe }}"); | ||
window.base_url = "{{ base_url|safe }}"; | ||
</script> | ||
<script src="{{ static_url('js/admin-react.js') }}"></script> | ||
</div> | ||
<div class="container-fluid navbar-default small version_footer"> | ||
<div class="navbar-text">JupyterHub {{ server_version }}</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- htmlhint doctype-first:false --> | ||
{% extends "page.html" %} | ||
{% block login_widget %} | ||
{% endblock login_widget %} | ||
{% block main %} | ||
<div class="ecl-container ecl-u-mv-xl container-fix"> | ||
{% block h1_error %} | ||
<h1>{{ status_code }} : {{ status_message }}</h1> | ||
{% endblock h1_error %} | ||
{% block error_detail %} | ||
{% if message %}<p>{{ message }}</p>{% endif %} | ||
{% if message_html %}<p>{{ message_html | safe }}</p>{% endif %} | ||
{% if extra_error_html %}<p>{{ extra_error_html | safe }}</p>{% endif %} | ||
{% endblock error_detail %} | ||
</div> | ||
{% endblock main %} | ||
{% block script %} | ||
{{ super() }} | ||
<script type="text/javascript"> | ||
function _remove_redirects_from_url() { | ||
if (window.location.search.length <= 1) { | ||
return; | ||
} | ||
var search_parameters = window.location.search.slice(1).split('&'); | ||
for (var i = 0; i < search_parameters.length; i++) { | ||
if (search_parameters[i].split('=')[0] === 'redirects') { | ||
// remote redirects from search parameters | ||
search_parameters.splice(i, 1); | ||
var new_search = ''; | ||
if (search_parameters.length) { | ||
new_search = '?' + search_parameters.join('&'); | ||
} | ||
var new_url = window.location.origin + | ||
window.location.pathname + | ||
new_search + | ||
window.location.hash; | ||
window.history.replaceState({}, "", new_url); | ||
return; | ||
} | ||
} | ||
} | ||
|
||
_remove_redirects_from_url(); | ||
</script> | ||
{% endblock script %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!-- htmlhint doctype-first:false,id-class-value:false --> | ||
{% extends "page.html" %} | ||
{% block main %} | ||
<div class="ecl-container ecl-u-mv-xl"> | ||
<div class="row"> | ||
<div class="text-center"> | ||
{% block heading %} | ||
<h1> | ||
{% if failed %} | ||
Spawn failed | ||
{% else %} | ||
Server not running | ||
{% endif %} | ||
</h1> | ||
{% endblock heading %} | ||
{% block message %} | ||
<p> | ||
{% if failed %} | ||
The latest attempt to start your server {{ server_name }} has failed. | ||
{% if failed_html_message %} | ||
</p> | ||
<p>{{ failed_html_message | safe }}</p> | ||
<p>{% elif failed_message %}</p> | ||
<p>{{ failed_message }}</p> | ||
<p> | ||
{% endif %} | ||
Would you like to retry starting it? | ||
{% else %} | ||
Your server {{ server_name }} is not running. | ||
{% if implicit_spawn_seconds %} | ||
It will be restarted automatically. | ||
If you are not redirected in a few seconds, | ||
click below to launch your server. | ||
{% else %} | ||
Would you like to start it? | ||
{% endif %} | ||
{% endif %} | ||
</p> | ||
{% endblock message %} | ||
{% block start_button %} | ||
<a id="start" | ||
role="button" | ||
class="ecl-button ecl-button--primary" | ||
href="{{ spawn_url }}"> | ||
{% if failed %} | ||
Relaunch | ||
{% else %} | ||
Launch | ||
{% endif %} | ||
Server {{ server_name }} | ||
</a> | ||
{% endblock start_button %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock main %} | ||
{% block script %} | ||
{{ super () }} | ||
{% if implicit_spawn_seconds %} | ||
<script type="text/javascript"> | ||
var spawn_url = "{{ spawn_url }}"; | ||
var implicit_spawn_seconds = { | ||
{ | ||
implicit_spawn_seconds | ||
} | ||
}; | ||
setTimeout(function() { | ||
console.log("redirecting to spawn at", spawn_url); | ||
window.location = spawn_url; | ||
}, | ||
1000 * implicit_spawn_seconds | ||
); | ||
</script> | ||
{% endif %} | ||
<script type="text/javascript"> | ||
require(["not_running"]); | ||
</script> | ||
{% endblock script %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!-- htmlhint doctype-first:false,id-class-value:false --> | ||
{% extends "page.html" %} | ||
{% block login_widget %} | ||
{% endblock login_widget %} | ||
{% block main %} | ||
<div class="ecl-container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
<h1 class="text-center">Authorize access</h1> | ||
<p class="lead">An application is requesting authorization to access data associated with your JupyterHub account</p> | ||
<p> | ||
{{ oauth_client.description }} (oauth URL: {{ oauth_client.redirect_uri }}) | ||
would like permission to identify you. | ||
{% if scope_descriptions | length == 1 and not scope_descriptions[0].scope %} | ||
It will not be able to take actions on | ||
your behalf. | ||
{% endif %} | ||
</p> | ||
<form method="post" action=""> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<p class="h5">This will grant the application permission to:</p> | ||
</div> | ||
<div class="card-body"> | ||
<input type="hidden" name="_xsrf" value="{{ xsrf }}" /> | ||
{# these are the 'real' inputs to the form -#} | ||
{% for scope in allowed_scopes %}<input type="hidden" name="scopes" value="{{ scope }}" />{% endfor %} | ||
{% for scope_info in scope_descriptions %} | ||
<div class="checkbox input-group"> | ||
<label> | ||
{# disabled because it's required #} | ||
<input type="checkbox" | ||
class="ecl-checkbox__input" | ||
name="raw-scopes" | ||
checked="true" | ||
title="This authorization is required" | ||
disabled="disabled" /> | ||
<span> | ||
{{ scope_info['description'] }} | ||
{% if scope_info['filter'] %}Applies to {{ scope_info['filter'] }}.{% endif %} | ||
</span> | ||
</label> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
<div class="card-footer"> | ||
<button type="submit" class="form-control ecl-button ecl-button--primary mt-2">Authorize</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock main % |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.