Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hint for export workflow #538

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ui/runs/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import io
import tempfile
import traceback
Expand All @@ -17,6 +18,7 @@
)
from django.shortcuts import render
from django.urls import reverse
from django.conf import settings

from protzilla.run import Run, get_available_run_names
from protzilla.run_helper import log_messages
Expand Down Expand Up @@ -386,6 +388,14 @@ def export_workflow(request: HttpRequest, run_name: str):
run = active_runs[run_name]
requested_workflow_name = request.POST["name"]
run._workflow_export(requested_workflow_name)
display_message(
{
"level": 20,
"msg": f"Workflow '{requested_workflow_name}' was exported successfully.<br>You can view it here: {os.path.join(settings.BASE_DIR, 'user_data', 'workflows')}",
},
request,
)

return HttpResponseRedirect(reverse("runs:detail", args=(run_name,)))


Expand Down
4 changes: 4 additions & 0 deletions ui/static/templates/databases.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
{% endfor %}
</div>
{% endif %}

<div class="mb-4">
<a href="/" id="backButton" type="button" class="btn btn-red mr-auto">Back</a>
</div>

<div class="mb-3">
To download a database, go to <a href="https://www.uniprot.org/uniprotkb" target="_blank">uniprot.org/uniprotkb</a>. A tutorial is available in the PROTzilla documentation.
Expand Down
2 changes: 1 addition & 1 deletion ui/static/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% if used_memory %}
Memory: {{ used_memory }}&nbsp &nbsp
{%endif%}
<a class="navbar-brand text-white" href="https://github.com/antonneubauer/PROTzilla2">
<a class="navbar-brand text-white" href="https://github.com/cschlaffner/PROTzilla2">
<img src="{% static 'img/github-mark-white.svg' %}" alt="Logo" width="30" height="30" class="d-inline-block align-text-top">
</a>
</div>
Expand Down
Loading