Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Sep 12, 2024
1 parent d7bb8b1 commit 83ad9f0
Show file tree
Hide file tree
Showing 9 changed files with 802 additions and 485 deletions.
21 changes: 13 additions & 8 deletions ec-templates/401.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- htmlhint doctype-first:false -->
{% extends "error.html" %} {% block main %}

{% extends "error.html" %}
{% block main %}
<div class="error">
<h1>Unauthorized!</h1>
<p>
Expand All @@ -17,12 +17,17 @@ <h1>Unauthorized!</h1>
</p>
<p>
See
<a href="https://docs.egi.eu/users/dev-env/notebooks/#notebooks-for-researchers/">
Documentation related to EGI Notebooks</a> about granting access. You can also
<a href="https://marketplace.eosc-portal.eu/services/egi-notebooks">place an
order in EOSC portal</a>
for the Notebooks service if you are interested in your own community deployment.
<a
href="https://docs.egi.eu/users/dev-env/notebooks/#notebooks-for-researchers/"
>
Documentation related to EGI Notebooks</a
>
about granting access. You can also
<a href="https://marketplace.eosc-portal.eu/services/egi-notebooks"
>place an order in EOSC portal</a
>
for the Notebooks service if you are interested in your own community
deployment.
</p>
</div>

{% endblock %}
20 changes: 13 additions & 7 deletions ec-templates/403.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- htmlhint doctype-first:false -->
{% extends "error.html" %} {% block main %}
{% extends "error.html" %}

{% block main %}
<div class="error">
<h1>Unauthorized!</h1>
<p>
Expand All @@ -17,12 +18,17 @@ <h1>Unauthorized!</h1>
</p>
<p>
See
<a href="https://docs.egi.eu/users/dev-env/notebooks/#notebooks-for-researchers/">
Documentation related to EGI Notebooks</a> about granting access. You can also
<a href="https://marketplace.eosc-portal.eu/services/egi-notebooks">place an
order in EOSC portal</a>
for the Notebooks service if you are interested in your own community deployment.
<a
href="https://docs.egi.eu/users/dev-env/notebooks/#notebooks-for-researchers/"
>
Documentation related to EGI Notebooks</a
>
about granting access. You can also
<a href="https://marketplace.eosc-portal.eu/services/egi-notebooks"
>place an order in EOSC portal</a
>
for the Notebooks service if you are interested in your own community
deployment.
</p>
</div>

{% endblock %}
8 changes: 5 additions & 3 deletions ec-templates/egi-login.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!-- htmlhint doctype-first:false -->
{% extends "page.html" %} {% if announcement_login %} {% set announcement =
announcement_login %} {% endif %}
<!-- htmlhint doctype-first:false,id-class-value:false -->
{% extends "page.html" %}
{% if announcement_login %}
{% set announcement = announcement_login %}
{% endif %}

{% block main %}
<div id="main-page-content" class="ecl-u-mb-l">
Expand Down
191 changes: 104 additions & 87 deletions ec-templates/home.html
Original file line number Diff line number Diff line change
@@ -1,95 +1,112 @@
<!-- htmlhint doctype-first:false,id-class-value:false -->
{% extends "page.html" %}
{% if announcement_home is string %}
{% set announcement = announcement_home %}
{% endif %}

{% block main %}
<div class="ecl-container ecl-u-mv-xl">
<h1 class="sr-only">JupyterHub home page</h1>
<div class="row">
<div class="text-center">
{% if default_server.active %}
<a id="stop" role="button" class="ecl-button ecl-button--cta">Stop My Server</a>{% endif %}
<a id="start"
role="button"
class="ecl-button ecl-button--primary"
href="{{ url }}">
{% if not default_server.active %}Start{% endif %}
My Server
</a>
</div>
<div class="ecl-container ecl-u-mv-xl">
<h1 class="sr-only">JupyterHub home page</h1>
<div class="row">
<div class="text-center">
{% if default_server.active %}
<a id="stop" role="button" class="ecl-button ecl-button--cta"
>Stop My Server</a
>{% endif %}
<a
id="start"
role="button"
class="ecl-button ecl-button--primary"
href="{{ url }}"
>
{% if not default_server.active %}Start{% endif %} My Server
</a>
</div>
{% if allow_named_servers %}
<h2>Named Servers</h2>
<p>
In addition to your default server,
you may have additional
{% if named_server_limit_per_user > 0 %}{{ named_server_limit_per_user }}{% endif %}
server(s) with names.
This allows you to have more than one server running at the same time.
</p>
{% set named_spawners = user.all_spawners(include_default=False)|list %}
<table class="server-table table table-striped">
<thead>
<tr>
<th>Server name</th>
<th>URL</th>
<th>Last activity</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr class="home-server-row add-server-row">
<td colspan="4">
<div class="input-group">
<input class="new-server-name form-control"
aria-label="server name"
placeholder="name-your-server">
<button role="button"
type="button"
class="new-server-btn btn btn-xs btn-primary">Add New Server</button>
</div>
</td>
</tr>
{% for spawner in named_spawners %}
<tr class="home-server-row" data-server-name="{{ spawner.name }}">
{# name #}
<td>{{ spawner.name }}</td>
{# url #}
<td>
<a class="server-link {% if not spawner.ready %}hidden{% endif %}"
href="{{ user.server_url(spawner.name) }}">{{ user.server_url(spawner.name) }}</a>
</td>
{# activity #}
<td class='time-col'>
{% if spawner.last_activity %}
{{ spawner.last_activity.isoformat() + 'Z' }}
{% else %}
Never
{% endif %}
</td>
{# actions #}
<td>
<a role="button"
class="stop-server btn btn-xs btn-danger{% if not spawner.active %} hidden{% endif %}"
id="stop-{{ spawner.name }}">stop</a>
<a role="button"
class="start-server btn btn-xs btn-primary {% if spawner.active %}hidden{% endif %}"
id="start-{{ spawner.name }}"
href="{{ base_url }}spawn/{{ user.name }}/{{ spawner.name }}">start</a>
<button role="button"
class="delete-server btn btn-xs btn-danger{% if spawner.active %} hidden{% endif %}"
id="delete-{{ spawner.name }}">delete</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endblock main %}
{% block script %}
{{ super() }}
<script type="text/javascript">
require(["home"]);
</script>
{% if allow_named_servers %}
<h2>Named Servers</h2>
<p>
In addition to your default server, you may have additional
{% if named_server_limit_per_user > 0 %}{{ named_server_limit_per_user }}{% endif %}
server(s) with names. This allows you to have more than one server
running at the same time.
</p>
{% set named_spawners = user.all_spawners(include_default=False)|list %}
<table class="server-table table table-striped">
<thead>
<tr>
<th>Server name</th>
<th>URL</th>
<th>Last activity</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr class="home-server-row add-server-row">
<td colspan="4">
<div class="input-group">
<input
class="new-server-name form-control"
aria-label="server name"
placeholder="name-your-server"
/>
<button
role="button"
type="button"
class="new-server-btn btn btn-xs btn-primary"
>
Add New Server
</button>
</div>
</td>
</tr>
{% for spawner in named_spawners %}
<tr class="home-server-row" data-server-name="{{ spawner.name }}">
{# name #}
<td>{{ spawner.name }}</td>
{# url #}
<td>
<a
class="server-link {% if not spawner.ready %}hidden{% endif %}"
href="{{ user.server_url(spawner.name) }}"
>{{ user.server_url(spawner.name) }}</a
>
</td>
{# activity #}
<td class="time-col">
{% if spawner.last_activity %} {{ spawner.last_activity.isoformat() + 'Z' }} {% else %} Never {% endif %}
</td>
{# actions #}
<td>
<a
role="button"
class="stop-server btn btn-xs btn-danger{% if not spawner.active %} hidden{% endif %}"
id="stop-{{ spawner.name }}"
>stop</a
>
<a
role="button"
class="start-server btn btn-xs btn-primary {% if spawner.active %}hidden{% endif %}"
id="start-{{ spawner.name }}"
href="{{ base_url }}spawn/{{ user.name }}/{{ spawner.name }}"
>start</a
>
<button
role="button"
class="delete-server btn btn-xs btn-danger{% if spawner.active %} hidden{% endif %}"
id="delete-{{ spawner.name }}"
>
delete
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endblock main %} {% block script %} {{ super() }}
<script type="text/javascript">
require(["home"]);
</script>
{% endblock script %}
10 changes: 2 additions & 8 deletions ec-templates/logout.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<!-- htmlhint doctype-first:false -->
{% extends "page.html" %}

{% block meta %}
<meta http-equiv="refresh" content="0; url=/">
<meta http-equiv="refresh" content="0; url=/" />
{% endblock %}

{% if announcement_logout %}
{% set announcement = announcement_logout %}
{% endif %}

{% block main %}

<div id="logout-main" class="container">
<p>
Successfully logged out.
</p>
<p>Successfully logged out.</p>
</div>

{% endblock %}
Loading

0 comments on commit 83ad9f0

Please sign in to comment.