aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui')
-rw-r--r--src/hydrilla/proxy/web_ui/root.py7
-rw-r--r--src/hydrilla/proxy/web_ui/templates/index.html.jinja26
2 files changed, 33 insertions, 0 deletions
diff --git a/src/hydrilla/proxy/web_ui/root.py b/src/hydrilla/proxy/web_ui/root.py
index 6f9e349..9a14268 100644
--- a/src/hydrilla/proxy/web_ui/root.py
+++ b/src/hydrilla/proxy/web_ui/root.py
@@ -195,6 +195,13 @@ def home_post() -> werkzeug.Response:
state.update_settings(advanced_user=True)
elif action == 'user_make_simple':
state.update_settings(advanced_user=False)
+ elif action == 'upate_all_items':
+ try:
+ state.upate_all_items()
+ except st.FileInstallationError:
+ return home({'file_installation_error': True})
+ except st.ImpossibleSituation:
+ return home({'impossible_situation_error': True})
elif action == 'prune_orphans':
state.prune_orphan_items()
else:
diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
index fe9c5d5..d6a47f0 100644
--- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
@@ -31,6 +31,14 @@ code in a proprietary work, I am not going to enforce this in court.
{% import 'import/checkbox_tricks.html.jinja' as tricks %}
{% block main %}
+ {% if file_installation_error is defined %}
+ {{ error_note(_('web_ui.err.file_installation_error')) }}
+ {% endif %}
+
+ {% if impossible_situation_error is defined %}
+ {{ error_note(_('web_ui.err.impossible_situation_error')) }}
+ {% endif %}
+
<h3>
{{ _('web_ui.home.heading.welcome_to_haketilo') }}
</h3>
@@ -187,6 +195,24 @@ code in a proprietary work, I am not going to enforce this in court.
])
}}
+ {% if settings.update_waiting %}
+ <div class="horizontal-separator"></div>
+
+ {{ label(_('web_ui.home.update_waiting_label')) }}
+
+ <p>
+ {{ _('web_ui.home.update_is_awaiting') }}
+ </p>
+
+ {% set update_but_text = _('web_ui.home.update_items_button') %}
+
+ {{
+ button_row([
+ (['green-button'], update_but_text, {'action': 'upate_all_items'})
+ ])
+ }}
+ {% endif %}
+
{% if orphan_item_stats.mappings > 0 or orphan_item_stats.resources > 0 %}
<div class="horizontal-separator"></div>