From 00487547c4aff6bf0c94438768191960a3369365 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 27 Sep 2022 13:42:55 +0200 Subject: [proxy] facilitate manually pruning orphaned packages (including installed ones) --- .../proxy/web_ui/templates/index.html.jinja | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/hydrilla/proxy/web_ui/templates/index.html.jinja') diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja index d95937a..ce77b24 100644 --- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja @@ -129,4 +129,37 @@ code in a proprietary work, I am not going to enforce this in court. {'action': 'user_make_simple'}) ]) }} + + {% if orphan_item_stats.mappings > 0 or orphan_item_stats.resources > 0 %} +
+ +

+ {% if settings.advanced_user %} + {% if orphan_item_stats.mappings > 0 %} + {{ + _('web_ui.home.orphans_to_delete_{mappings}') + .format(mappings = orphan_item_stats.mappings) + }} + {% else %} + {{ _('web_ui.home.orphans_to_delete_exist') }} + {% endif %} + {% else %} + {{ + _('web_ui.home.orphans_to_delete_{mappings}_{resources}') + .format( + mappings = orphan_item_stats.mappings, + resources = orphan_item_stats.resources + ) + }} + {% endif %} +

+ + {% set prune_but_text = _('web_ui.home.prune_orphans_button') %} + + {{ + button_row([ + (['green-button'], prune_but_text, {'action': 'prune_orphans'}) + ]) + }} + {% endif %} {% endblock %} -- cgit v1.2.3