From bd70b4b7ec28c1f16c161e9c99a65b56b8465318 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 7 Sep 2023 10:50:44 -0400 Subject: [PATCH] Increase point budget, auto-login logic PoC --- app/static/app/js/ModelView.jsx | 2 +- app/templates/app/registration/login.html | 37 ++++++++++++++++++++++- app/templatetags/settings.py | 4 +++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/app/static/app/js/ModelView.jsx b/app/static/app/js/ModelView.jsx index b149743e2..3a0478ce1 100644 --- a/app/static/app/js/ModelView.jsx +++ b/app/static/app/js/ModelView.jsx @@ -298,7 +298,7 @@ class ModelView extends React.Component { window.viewer = new Potree.Viewer(container); viewer.setEDLEnabled(true); viewer.setFOV(60); - viewer.setPointBudget(1*1000*1000); + viewer.setPointBudget(10*1000*1000); viewer.setEDLEnabled(true); viewer.loadSettingsFromURL(); diff --git a/app/templates/app/registration/login.html b/app/templates/app/registration/login.html index 164a46e3e..9945dd422 100644 --- a/app/templates/app/registration/login.html +++ b/app/templates/app/registration/login.html @@ -10,11 +10,12 @@ {% endif %} {% is_single_user_mode as autologin %} + {% external_auth_endpoint as ext_auth_ep %} {% if autologin %} {% else %} -
{% csrf_token %} + {% csrf_token %} {% for field in form %} {% include 'registration/form_field.html' %} {% endfor %} @@ -34,5 +35,39 @@
+ + {% if ext_auth_ep != '' %} +
+ +
+ + {% endif %} + {% endif %} {% endblock %} \ No newline at end of file diff --git a/app/templatetags/settings.py b/app/templatetags/settings.py index a540ae5eb..e439e161c 100644 --- a/app/templatetags/settings.py +++ b/app/templatetags/settings.py @@ -9,6 +9,10 @@ register = template.Library() logger = logging.getLogger('app.logger') +@register.simple_tag +def external_auth_endpoint(): + return settings.EXTERNAL_AUTH_ENDPOINT + @register.filter def disk_size(megabytes): k = 1000