Skip to content

Commit

Permalink
Fix errors from pre-commit.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed Jan 22, 2025
1 parent 9823278 commit ec006f7
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 88 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ variables:
GIT_CLEAN_FLAGS: "-ffdx"
# Change pip's cache directory to be inside the project directory since we can only cache local items.
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
EXTRA_VALUES_ACCEPTANCE: '--values ./secrets/config/common/common.yaml --values ./secrets/config/common/cryptnono.yaml --values ./secrets/config/common/gesis.yaml --values ./secrets/config/gesis-acceptance.yaml --values ./config/gesis.yml --values ./config/gesis-acceptance.yml'
EXTRA_VALUES_ACCEPTANCE: "--values ./secrets/config/common/common.yaml --values ./secrets/config/common/cryptnono.yaml --values ./secrets/config/common/gesis.yaml --values ./secrets/config/gesis-acceptance.yaml --values ./config/gesis.yml --values ./config/gesis-acceptance.yml"

# This workflow:rules are required to enable merge request pipelines!
workflow:
Expand Down Expand Up @@ -53,7 +53,7 @@ include:
stage: lint
dir: mybinder
extra_values: ${EXTRA_VALUES_ACCEPTANCE}
git_crypt: 'true'
git_crypt: "true"
rules:
- if: $CI_SERVER_FQDN == "git.gesis.org" && $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_SERVER_FQDN == "git.gesis.org" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Expand All @@ -65,6 +65,6 @@ include:
dir: mybinder
k8s_context: methods-hub/binder.methodshub.gesis.org:acceptance
extra_values: ${EXTRA_VALUES_ACCEPTANCE}
git_crypt: 'true'
git_crypt: "true"
rules:
- if: $CI_SERVER_FQDN == "git.gesis.org" && $CI_PIPELINE_SOURCE == 'merge_request_event'
2 changes: 1 addition & 1 deletion config/gesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ prometheus:
persistentVolume:
storageClass: local-storage-prometheus
static:
enabled: false
enabled: false
31 changes: 13 additions & 18 deletions mybinder/files/etc/jupyter/templates/login.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
{% extends "templates/login.html" %}

{% block header_buttons %}
{% block login_widget %}
{% endblock %}
{% extends "templates/login.html" %} {% block header_buttons %} {% block
login_widget %} {% endblock %}
<span class="flex-spacer"></span>
{{super()}}
{% endblock header_buttons %}

{% block site %}
{{super()}} {% endblock header_buttons %} {% block site %}
<div id="ipython-main-app" class="container">
<h1>Binder inaccessible</h1>
<h2>
You can get a new Binder for this repo by clicking <a href="{{binder_url}}">here</a>.
You can get a new Binder for this repo by clicking
<a href="{{binder_url}}">here</a>.
</h2>
<p>
The shareable URL for this repo is: <tt>{{binder_url}}</tt>
</p>
<p>The shareable URL for this repo is: <tt>{{binder_url}}</tt></p>

<h4>Is this a Binder that you created?</h4>
<p>
If so, your authentication cookie for this Binder has been deleted or expired.
You can launch a new Binder for this repo by clicking <a href="{{binder_url}}">here</a>.
If so, your authentication cookie for this Binder has been deleted or
expired. You can launch a new Binder for this repo by clicking
<a href="{{binder_url}}">here</a>.
</p>

<h4>Did someone give you this Binder link?</h4>
<p>
If so, the link is outdated or incorrect.
Recheck the link for typos or ask the person who gave you the link for an updated link.
A shareable Binder link should look like <tt>{{binder_url}}</tt>.
If so, the link is outdated or incorrect. Recheck the link for typos or ask
the person who gave you the link for an updated link. A shareable Binder
link should look like <tt>{{binder_url}}</tt>.
</p>
</div>
{% endblock site %}
92 changes: 47 additions & 45 deletions mybinder/files/etc/jupyter/templates/page.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
{% extends "templates/page.html" %}

{% block header_buttons %}

{% block login_widget %}
{% endblock %}

{% if jitsi_url %}
<span>
<a id="visit-repo-link" href="{{ jitsi_url }}" class="btn btn-default btn-sm navbar-btn" target="_blank"
style="margin-right: 2px; margin-left: 4px;">Join this repo's Video Chat</a>
</span>
{% endif %}

{% if ref_url %}
<span>
<a id="visit-repo-link" href="{{ ref_url }}" class="btn btn-default btn-sm navbar-btn" target="_blank"
style="margin-right: 2px; margin-left: 4px;">Visit repo</a>
</span>
{% endif %}

{% if persistent_binder_url %}
<span>
<button id="copy-binder-link" title="Copy binder link to clipboard" class="btn btn-default btn-sm navbar-btn"
style="margin-right: 0; margin-left: 2px;"
data-url="{{ persistent_binder_url }}" onclick="copy_link_into_clipboard(this);">
Copy Binder link
</button>
</span>
{% endif %}

{% endblock header_buttons %}

{% block script %}
{% if persistent_binder_url %}
<script type='text/javascript'>
function copy_link_into_clipboard(b) {
var $temp = $("<input>");
$(b).parent().append($temp);
$temp.val($(b).data('url')).select();
document.execCommand("copy");
$temp.remove();
}
{% extends "templates/page.html" %} {% block header_buttons %} {% block
login_widget %} {% endblock %} {% if jitsi_url %}
<span>
<a
id="visit-repo-link"
href="{{ jitsi_url }}"
class="btn btn-default btn-sm navbar-btn"
target="_blank"
style="margin-right: 2px; margin-left: 4px"
>Join this repo's Video Chat</a
>
</span>
{% endif %} {% if ref_url %}
<span>
<a
id="visit-repo-link"
href="{{ ref_url }}"
class="btn btn-default btn-sm navbar-btn"
target="_blank"
style="margin-right: 2px; margin-left: 4px"
>Visit repo</a
>
</span>
{% endif %} {% if persistent_binder_url %}
<span>
<button
id="copy-binder-link"
title="Copy binder link to clipboard"
class="btn btn-default btn-sm navbar-btn"
style="margin-right: 0; margin-left: 2px"
data-url="{{ persistent_binder_url }}"
onclick="copy_link_into_clipboard(this);"
>
Copy Binder link
</button>
</span>
{% endif %} {% endblock header_buttons %} {% block script %} {% if
persistent_binder_url %}
<script type="text/javascript">
function copy_link_into_clipboard(b) {
var $temp = $("<input>");
$(b).parent().append($temp);
$temp.val($(b).data("url")).select();
document.execCommand("copy");
$temp.remove();
}
</script>
{% endif %}
{% endblock %}
{% endif %} {% endblock %}
30 changes: 13 additions & 17 deletions mybinder/files/etc/jupyter/templates/tree.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{% extends "templates/tree.html" %}

{% block headercontainer %}
<span class="flex-spacer"></span>
{% endblock %}

{% block header_buttons %}
{{super()}}
{% if shutdown_button %}
<span id="shutdown_widget">
<button id="shutdown" class="btn btn-sm navbar-btn"
title="{% trans %}Stop the Jupyter server{% endtrans %}">
{% trans %}Quit{% endtrans %}
</button>
</span>
{% endif %}
{% endblock header_buttons %}
{% extends "templates/tree.html" %} {% block headercontainer %}
<span class="flex-spacer"></span>
{% endblock %} {% block header_buttons %} {{super()}} {% if shutdown_button %}
<span id="shutdown_widget">
<button
id="shutdown"
class="btn btn-sm navbar-btn"
title="{% trans %}Stop the Jupyter server{% endtrans %}"
>
{% trans %}Quit{% endtrans %}
</button>
</span>
{% endif %} {% endblock header_buttons %}
2 changes: 1 addition & 1 deletion mybinder/templates/static/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ metadata:
release: {{ .Release.Name }}
data:
{{- (.Files.Glob "files/static/*").AsConfig | nindent 2 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion mybinder/templates/static/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ spec:
name: config
- mountPath: /www/data/
name: files
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion mybinder/templates/static/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ spec:
{{- range $host := .Values.static.ingress.hosts }}
- {{ $host }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion mybinder/templates/static/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
app: static
component: nginx
release: {{ .Release.Name }}
{{- end }}
{{- end }}

0 comments on commit ec006f7

Please sign in to comment.