Skip to content

Commit

Permalink
Getting b2drop working
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Aug 26, 2024
1 parent b5fd7a8 commit 41088f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion egi_notebooks_hub/b2drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _render_options_form(self, profile_list):
else:
profile_form_template = env.get_template("b2drop-form.html")
return profile_form_template.render(
profile_list=self._profile_list,
profile_list=profile_list,
b2drop_ready=self.b2drop_ready,
b2drop_user=self.b2drop_user,
b2drop_pwd=self.b2drop_pwd,
Expand Down
32 changes: 16 additions & 16 deletions egi_notebooks_hub/templates/b2drop-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,20 @@ <h3>{{ profile.display_name }}</h3>
</div>
</label>
{%- endfor %}
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a class="collabpsed" role="button" data-toggle="collapse" data-parent="#accordion"
href="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
B2DROP connection
</a>
<div class="accordion" id="accordion-b2drop">
<div class="accordion-item">
<h4 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#collapse-b2drop" aria-expanded="false"
aria-controls="collapse-b2drop">
<span class="px-2">B2DROP connection</span>
{%if b2drop_ready %}
<span class="label label-success">Already configured!</span>
<span class="label label-success">Already configured!</span>
{% endif %}
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
</button>
</h4>
<div id="collapse-b2drop" class="accordion-collapse collapse" data-bs-parent="#accordion-b2drop">
<div class="accordion-body">
<div class="form-group">
<label for="b2drop-user" class="form-label">B2DROP app Username</label>
<input type="text" class="form-control" name="b2drop-user" id="b2drop-user"
Expand All @@ -79,13 +78,13 @@ <h4 class="panel-title">
Create new app password at
<a href="https://b2drop.eudat.eu/settings/user/security">
B2DROP security configuration</a>
</div>
</div>
</div> FORM TEXT
</div> FORM GROUP
<div class="form-group">
<label for="b2drop-pwd" class="form-label">B2DROP app Password</label>
<input type="password" class="form-control" name="b2drop-pwd" id="b2drop-pwd"
value="{{ b2drop_pwd }}"/>
</div>
</div> FORM GROUP
<div class="form-group">
<input type="checkbox" id="b2drop-remember" name="b2drop-remember"
{%if b2drop_ready %}checked{% endif %}/>
Expand All @@ -98,6 +97,7 @@ <h4 class="panel-title">
</div>
</div>
</div>

<script>
$(".js-profile-option-select, .js-profile-option-label").click(function () {
// we need this bit of JS to select the profile when a <select> inside is clicked.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jupyterhub>=4.0.2
jupyterhub>=5.0.0
oauthenticator>=16.3.0
jupyterhub-kubespawner>=6.1.0
xmltodict
Expand Down

0 comments on commit 41088f1

Please sign in to comment.