Skip to content

Commit

Permalink
Add anonymous message
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Apr 24, 2024
1 parent c60924c commit a6d733a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions applications/jupyterhub/theming/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ <h4 class="modal-title" id="{{key}}-label">{{title}}</h4>
margin-bottom: 57px;
}

#warning-message {
color: #ffcc00;
margin: 10px;
}

.spawn-container {
display: flex;
align-items: center;
Expand Down
5 changes: 5 additions & 0 deletions applications/jupyterhub/theming/spawn_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% block message %}
<p>We are loading the workspace…</p>
{% endblock %}
<p id="warning-message"></p>
<p id="progress-message"></p>
<div class="progress">
<div id="progress-bar" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0"
Expand Down Expand Up @@ -56,9 +57,13 @@
var html_message;
if (evt.html_message !== undefined) {
progressMessage.html(evt.html_message);

html_message = evt.html_message;
} else if (evt.message !== undefined) {
progressMessage.text(evt.message);
if(evt.message.includes("anonymous-")) {
$("#warning-message").html(`You are running as an anonymous user. The current session will have limited resources and might be deleted at any time. Please <a target="_blank" href="//${window.location.host.split(".").splice(1).join(".")}">log in as an OSBv2 user</a> to get more resources and persisted workspaces.`);
}
html_message = progressMessage.html();
}
if (html_message) {
Expand Down

0 comments on commit a6d733a

Please sign in to comment.