Skip to content

Commit

Permalink
Bugfixes before release 2.2.0 (#252)
Browse files Browse the repository at this point in the history
Co-authored-by: Hamza <[email protected]>
  • Loading branch information
akochari and hamzaimran08 authored Nov 6, 2024
1 parent ba73b9a commit 32dc57f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/forms/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _setup_form_helper(self):
),
SRVCommonDivField("source_code_url", placeholder="Provide a link to the public source code"),
SRVCommonDivField("port", placeholder="8000"),
SRVCommonDivField("image", placeholder="registry/repository/image:tag"),
SRVCommonDivField("image", placeholder="e.g. docker.io/username/image-name:image-tag"),
css_class="card-body",
)

Expand Down
2 changes: 1 addition & 1 deletion apps/forms/gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _setup_form_helper(self):
placeholder="Describe why you want to make the app accessible only via a link",
),
SRVCommonDivField("port", placeholder="7860"),
SRVCommonDivField("image"),
SRVCommonDivField("image", placeholder="e.g. docker.io/username/image-name:image-tag"),
css_class="card-body",
)
self.helper.layout = Layout(body, self.footer)
Expand Down
2 changes: 1 addition & 1 deletion apps/forms/shiny.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _setup_form_helper(self):
),
SRVCommonDivField("source_code_url", placeholder="Provide a link to the public source code"),
SRVCommonDivField("port", placeholder="3838"),
SRVCommonDivField("image", placeholder="registry/repository/image:tag"),
SRVCommonDivField("image", placeholder="e.g. docker.io/username/image-name:image-tag"),
Accordion(
AccordionGroup(
"Advanced settings",
Expand Down
2 changes: 1 addition & 1 deletion apps/forms/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _setup_form_helper(self):
placeholder="Describe why you want to make the app accessible only via a link",
),
SRVCommonDivField("port", placeholder="8501"),
SRVCommonDivField("image"),
SRVCommonDivField("image", placeholder="e.g. docker.io/username/image-name:image-tag"),
css_class="card-body",
)
self.helper.layout = Layout(body, self.footer)
Expand Down
6 changes: 4 additions & 2 deletions apps/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ def get_threshold(threshold):

# Handle deletion of apps in the "Develop" category
for orm_model in APP_REGISTRY.iter_orm_models():
old_develop_apps = orm_model.objects.filter(created_on__lt=get_threshold(7), app__category__name="Develop")
old_develop_apps = orm_model.objects.filter(
created_on__lt=get_threshold(7), app__category__name="Develop"
).exclude(app_status__status="Deleted")

for app_ in old_develop_apps:
delete_resource.delay(app_.serialize())

# Handle deletion of non persistent file managers
old_file_managers = FilemanagerInstance.objects.filter(
created_on__lt=timezone.now() - timezone.timedelta(days=1), persistent=False
)
).exclude(app_status__status="Deleted")
for app_ in old_file_managers:
delete_resource.delay(app_.serialize())

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ui-tests/test-public-webpages.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Tests of the public pages of the website", () => {
})

it("should open the Apps and models page on link click", () => {
cy.get("li.nav-item a").contains("Apps and models").click()
cy.get("li.nav-item a").contains("Apps & Models").click()
cy.url().should("include", "/apps")
cy.get('h3').should('contain', 'Public applications and models')
cy.get("title").should("have.text", "Apps and models | SciLifeLab Serve (beta)")
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/ui-tests/test-signup.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ describe("Test sign up", () => {
cy.url().should("include", "accounts/login");
cy.get('.alert-success').should(
'contain',
'Please check your email for a verification link.' +
' If you don’t see it, please contact us at [email protected]'
'Please check your email for a verification link.'
);

// TO-DO: add steps to check that email was sent, get token from email, go to email verification page, submit token there, then log in with new account
Expand Down
2 changes: 1 addition & 1 deletion fixtures/apps_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
{
"fields": {
"category": "serve",
"chart": "ghcr.io/scilifelabdatacentre/serve-charts/shinyproxy:1.4.1",
"chart": "ghcr.io/scilifelabdatacentre/serve-charts/shinyproxy:1.4.2",
"created_on": "2023-08-25T21:34:37.815Z",
"description": "",
"logo": "shinyapp-logo.svg",
Expand Down
4 changes: 2 additions & 2 deletions templates/apps/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<h3>{{ instance.name }} Logs</h3> <h5><span class="shadow badge bg-secondary" id="status-{{ instance.app.slug }}-{{ instance.pk }}"> {{ instance.status.latest.status_type }}</span></h5>
</div>
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center">
<p> <span class="fw-bold"> Note:</span> Logs appear a few minutes after an app has been launched. The Status on the top right is an indication of the state of the app. {% if instance.app.slug == 'customapp' and instance.volume %} If the app is not running (due to an error) and you have a volume attached to the app, then you can switch between to the tabs below to see logs for the data copy process. The data copy tab will be shown in red in this case. If the data copy succeeds, then the data copy tab is disabled and can't be accessed. This can give you hints if data copy failed.{% endif %} </p>
<p> <span class="fw-bold"> Note:</span> Logs appear a few minutes after an app has been launched. The Status on the top right is an indication of the state of the app. {% if instance.app.slug in 'customapp,gradio,streamlit' and instance.volume %} If the app is not running (due to an error) and you have a volume attached to the app, then you can switch between to the tabs below to see logs for the data copy process. The data copy tab will be shown in red in this case. If the data copy succeeds, then the data copy tab is disabled and can't be accessed. This can give you hints if data copy failed.{% endif %} </p>
</div>
<div>
<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="shadow nav-link nav-tab-logs active" id="nav-container1-tab" data-bs-toggle="tab" data-bs-target="#nav-container1" type="button" role="tab" aria-controls="nav-container1" aria-selected="true" onclick="updateContainer('{{ instance.subdomain.subdomain }}')">{{instance.name}}</button>

{% if instance.app.slug == 'customapp' and instance.volume %}
{% if instance.app.slug in 'customapp,gradio,streamlit' and instance.volume %}
<button class="nav-link nav-tab-logs {% if instance.app_status.status == 'Running' %}disabled {% else %}nav-tab-error shadow {% endif %}" id="nav-container2-tab" data-bs-toggle="tab" data-bs-target="#nav-container2" type="button" role="tab" aria-controls="nav-container2" aria-selected="false" onclick="updateContainer('copy-to-pvc')">Data Copy</button>
{% endif %}
</div>
Expand Down

0 comments on commit 32dc57f

Please sign in to comment.