diff --git a/plinth/modules/diagnostics/templates/diagnostics.html b/plinth/modules/diagnostics/templates/diagnostics.html index f2212c096..e87525db6 100644 --- a/plinth/modules/diagnostics/templates/diagnostics.html +++ b/plinth/modules/diagnostics/templates/diagnostics.html @@ -6,17 +6,6 @@ {% load i18n %} {% load static %} -{% block page_head %} - - {% if is_running %} - - {% endif %} - -{% endblock %} - - {% block configuration %} {% if not is_running %} @@ -61,11 +50,3 @@ {% endif %} {% endblock %} - - -{% block page_js %} - {% if is_running %} - - {% endif %} -{% endblock %} - diff --git a/plinth/modules/diagnostics/views.py b/plinth/modules/diagnostics/views.py index 9b441032e..0c81f7440 100644 --- a/plinth/modules/diagnostics/views.py +++ b/plinth/modules/diagnostics/views.py @@ -17,11 +17,13 @@ def index(request): if request.method == 'POST' and not diagnostics.running_task: diagnostics.start_task() + is_running = diagnostics.running_task is not None return TemplateResponse( request, 'diagnostics.html', { 'app_info': diagnostics.app.info, - 'is_running': diagnostics.running_task is not None, - 'results': diagnostics.current_results + 'is_running': is_running, + 'results': diagnostics.current_results, + 'refresh_page_sec': 3 if is_running else None }) diff --git a/plinth/modules/gitweb/templates/gitweb_configure.html b/plinth/modules/gitweb/templates/gitweb_configure.html index 888241a64..93813c452 100644 --- a/plinth/modules/gitweb/templates/gitweb_configure.html +++ b/plinth/modules/gitweb/templates/gitweb_configure.html @@ -82,12 +82,3 @@ {% endblock %} - - -{% block page_js %} - - {% if cloning %} - - {% endif %} - -{% endblock %} diff --git a/plinth/modules/gitweb/views.py b/plinth/modules/gitweb/views.py index 9affd6baf..26027579f 100644 --- a/plinth/modules/gitweb/views.py +++ b/plinth/modules/gitweb/views.py @@ -31,6 +31,7 @@ class GitwebAppView(views.AppView): repos = gitweb.app.get_repo_list() context['repos'] = repos context['cloning'] = any('clone_progress' in repo for repo in repos) + context['refresh_page_sec'] = 3 if context['cloning'] else None return context diff --git a/plinth/modules/monkeysphere/templates/monkeysphere.html b/plinth/modules/monkeysphere/templates/monkeysphere.html index 16647a098..76c170181 100644 --- a/plinth/modules/monkeysphere/templates/monkeysphere.html +++ b/plinth/modules/monkeysphere/templates/monkeysphere.html @@ -9,12 +9,6 @@ {% block page_head %} - {% if running %} - - {% endif %} -