From 73d9153ecafce06749ddaff44e49085d4e145033 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:17:56 +0200 Subject: [PATCH 1/7] Fix code style --- src/servala/frontend/views/support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/servala/frontend/views/support.py b/src/servala/frontend/views/support.py index a5de757..7deef49 100644 --- a/src/servala/frontend/views/support.py +++ b/src/servala/frontend/views/support.py @@ -51,7 +51,8 @@ class SupportView(OrganizationViewMixin, FormView): self.request, mark_safe( _( - 'There was an error submitting your support request. Please try again or contact us directly at servala-support@vshn.ch.' + 'There was an error submitting your support request. " + "Please try again or contact us directly at servala-support@vshn.ch.' ) ), ) From 7975d0a00e1ee320ca47346088947c92ebf00f1d Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:19:09 +0200 Subject: [PATCH 2/7] Show external links on service detail page --- .../frontend/organizations/service_detail.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/servala/frontend/templates/frontend/organizations/service_detail.html b/src/servala/frontend/templates/frontend/organizations/service_detail.html index d03489e..d9ca433 100644 --- a/src/servala/frontend/templates/frontend/organizations/service_detail.html +++ b/src/servala/frontend/templates/frontend/organizations/service_detail.html @@ -26,6 +26,24 @@

{{ service.description|default:"No description available."|urlize }}

+ {% if service.external_links %} +
+
+
{% translate "External Links" %}
+
+ {% for link in service.external_links %} + + {{ link.title }} + + + {% endfor %} +
+
+
+ {% endif %}
From 160734e9d446dc2056d559c3781be7c6a096f5a5 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:20:11 +0200 Subject: [PATCH 3/7] fixup! Fix code style --- src/servala/frontend/views/support.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/servala/frontend/views/support.py b/src/servala/frontend/views/support.py index 7deef49..9181c1e 100644 --- a/src/servala/frontend/views/support.py +++ b/src/servala/frontend/views/support.py @@ -51,8 +51,8 @@ class SupportView(OrganizationViewMixin, FormView): self.request, mark_safe( _( - 'There was an error submitting your support request. " - "Please try again or contact us directly at servala-support@vshn.ch.' + "There was an error submitting your support request. " + "Please try again or contact us directly at servala-support@vshn.ch." ) ), ) From 3c365c08249fbc67decb6d4dfc5a9219e5cc9638 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:20:25 +0200 Subject: [PATCH 4/7] Code style --- .../frontend/templates/account/login.html | 29 +++++++------ .../frontend/templates/frontend/base.html | 9 +++- .../frontend/templates/frontend/profile.html | 3 +- .../frontend/templates/includes/message.html | 43 ++++++++++--------- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/servala/frontend/templates/account/login.html b/src/servala/frontend/templates/account/login.html index 233118b..58cd49b 100644 --- a/src/servala/frontend/templates/account/login.html +++ b/src/servala/frontend/templates/account/login.html @@ -1,21 +1,22 @@ {% extends "frontend/base.html" %} {% load static i18n %} {% load allauth account socialaccount %} - {% block html_title %} {% translate "Sign in" %} {% endblock html_title %} - {% block page_title %} {% translate "Welcome to Servala" %} {% endblock page_title %} - {% block card_header %} -
- Servala +
+ Servala
{% endblock card_header %} - {% block card_content %} {% if SOCIALACCOUNT_ENABLED %} @@ -24,9 +25,10 @@
{% translate "Ready to get started?" %}
-

{% translate "Sign in to access your managed service instances and the Servala service catalog" %}

+

+ {% translate "Sign in to access your managed service instances and the Servala service catalog" %} +

- {% for provider in socialaccount_providers %} {% provider_login_url provider process=process scope=scope auth_params=auth_params as href %}
@@ -35,7 +37,9 @@
@@ -43,7 +47,6 @@
{% endif %} {% endif %} -
- -
diff --git a/src/servala/frontend/templates/frontend/base.html b/src/servala/frontend/templates/frontend/base.html index c2d9285..990dc17 100644 --- a/src/servala/frontend/templates/frontend/base.html +++ b/src/servala/frontend/templates/frontend/base.html @@ -5,13 +5,18 @@ - + - {% block html_title %}Dashboard{% endblock html_title %} – Servala + + {% block html_title %} + Dashboard + {% endblock html_title %} + – Servala diff --git a/src/servala/frontend/templates/frontend/profile.html b/src/servala/frontend/templates/frontend/profile.html index dc12100..b9c1799 100644 --- a/src/servala/frontend/templates/frontend/profile.html +++ b/src/servala/frontend/templates/frontend/profile.html @@ -116,7 +116,8 @@ {% endblocktranslate %}

- {% translate "VSHN Account Console" %} diff --git a/src/servala/frontend/templates/includes/message.html b/src/servala/frontend/templates/includes/message.html index 59260d2..3125da1 100644 --- a/src/servala/frontend/templates/includes/message.html +++ b/src/servala/frontend/templates/includes/message.html @@ -1,28 +1,29 @@ -
+
{{ message }}
- \ No newline at end of file + document.addEventListener('DOMContentLoaded', function() { + const alert = document.getElementById('auto-dismiss-alert-{{ forloop.counter0|default:' + 0 ' }}'); + if (alert) { + setTimeout(function() { + let opacity = 1; + const fadeOutInterval = setInterval(function() { + if (opacity > 0.05) { + opacity -= 0.05; + alert.style.opacity = opacity; + } else { + clearInterval(fadeOutInterval); + const bsAlert = new bootstrap.Alert(alert); + bsAlert.close(); + } + }, 25); + }, 5000); + } + }); + From 208c07e58bda6335fa836830a86c7cd12bf3f46e Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:17:56 +0200 Subject: [PATCH 5/7] Fix code style --- src/servala/frontend/views/support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/servala/frontend/views/support.py b/src/servala/frontend/views/support.py index a5de757..9181c1e 100644 --- a/src/servala/frontend/views/support.py +++ b/src/servala/frontend/views/support.py @@ -51,7 +51,8 @@ class SupportView(OrganizationViewMixin, FormView): self.request, mark_safe( _( - 'There was an error submitting your support request. Please try again or contact us directly at servala-support@vshn.ch.' + "There was an error submitting your support request. " + "Please try again or contact us directly at servala-support@vshn.ch." ) ), ) From 487317bb43a58f73b199bd76f70c3212d9379e58 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:19:09 +0200 Subject: [PATCH 6/7] Show external links on service detail page --- .../frontend/organizations/service_detail.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/servala/frontend/templates/frontend/organizations/service_detail.html b/src/servala/frontend/templates/frontend/organizations/service_detail.html index d03489e..d9ca433 100644 --- a/src/servala/frontend/templates/frontend/organizations/service_detail.html +++ b/src/servala/frontend/templates/frontend/organizations/service_detail.html @@ -26,6 +26,24 @@

{{ service.description|default:"No description available."|urlize }}

+ {% if service.external_links %} +
+
+
{% translate "External Links" %}
+
+ {% for link in service.external_links %} + + {{ link.title }} + + + {% endfor %} +
+
+
+ {% endif %}
From e24e3686548d636459c5900a5164ebb2a86e8b6b Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Fri, 11 Jul 2025 13:20:25 +0200 Subject: [PATCH 7/7] Code style --- .../frontend/templates/account/login.html | 29 +++++++------ .../frontend/templates/frontend/base.html | 9 +++- .../frontend/templates/frontend/profile.html | 3 +- .../frontend/templates/includes/message.html | 43 ++++++++++--------- 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/servala/frontend/templates/account/login.html b/src/servala/frontend/templates/account/login.html index 233118b..58cd49b 100644 --- a/src/servala/frontend/templates/account/login.html +++ b/src/servala/frontend/templates/account/login.html @@ -1,21 +1,22 @@ {% extends "frontend/base.html" %} {% load static i18n %} {% load allauth account socialaccount %} - {% block html_title %} {% translate "Sign in" %} {% endblock html_title %} - {% block page_title %} {% translate "Welcome to Servala" %} {% endblock page_title %} - {% block card_header %} -
- Servala +
+ Servala
{% endblock card_header %} - {% block card_content %} {% if SOCIALACCOUNT_ENABLED %} @@ -24,9 +25,10 @@
{% translate "Ready to get started?" %}
-

{% translate "Sign in to access your managed service instances and the Servala service catalog" %}

+

+ {% translate "Sign in to access your managed service instances and the Servala service catalog" %} +

- {% for provider in socialaccount_providers %} {% provider_login_url provider process=process scope=scope auth_params=auth_params as href %}
@@ -35,7 +37,9 @@
@@ -43,7 +47,6 @@
{% endif %} {% endif %} -
- -
diff --git a/src/servala/frontend/templates/frontend/base.html b/src/servala/frontend/templates/frontend/base.html index c2d9285..990dc17 100644 --- a/src/servala/frontend/templates/frontend/base.html +++ b/src/servala/frontend/templates/frontend/base.html @@ -5,13 +5,18 @@ - + - {% block html_title %}Dashboard{% endblock html_title %} – Servala + + {% block html_title %} + Dashboard + {% endblock html_title %} + – Servala diff --git a/src/servala/frontend/templates/frontend/profile.html b/src/servala/frontend/templates/frontend/profile.html index dc12100..b9c1799 100644 --- a/src/servala/frontend/templates/frontend/profile.html +++ b/src/servala/frontend/templates/frontend/profile.html @@ -116,7 +116,8 @@ {% endblocktranslate %}

- {% translate "VSHN Account Console" %} diff --git a/src/servala/frontend/templates/includes/message.html b/src/servala/frontend/templates/includes/message.html index 59260d2..3125da1 100644 --- a/src/servala/frontend/templates/includes/message.html +++ b/src/servala/frontend/templates/includes/message.html @@ -1,28 +1,29 @@ -
+
{{ message }}
- \ No newline at end of file + document.addEventListener('DOMContentLoaded', function() { + const alert = document.getElementById('auto-dismiss-alert-{{ forloop.counter0|default:' + 0 ' }}'); + if (alert) { + setTimeout(function() { + let opacity = 1; + const fadeOutInterval = setInterval(function() { + if (opacity > 0.05) { + opacity -= 0.05; + alert.style.opacity = opacity; + } else { + clearInterval(fadeOutInterval); + const bsAlert = new bootstrap.Alert(alert); + bsAlert.close(); + } + }, 25); + }, 5000); + } + }); +