aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-25 11:30:45 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-25 11:30:45 +0200
commit37b3cf9fb2a56cfa980844f527d834916b38cca8 (patch)
tree288a3b3ddc7e1fe115d568480f44313173183c2d /src/hydrilla/proxy/web_ui/templates
parent44c09ab27ce8407f4fc5c75df9cdf309df8463eb (diff)
downloadhaketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.tar.gz
haketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.zip
[proxy] make Haketilo popup functional
* Ad hoc payload creation was additionally fixed in this commit. * Addition on newly created script blocking/allowing rules to pattern tree was additionally fixed in this commit. It is no longer necessary to restart Haketilo for new rules to come into effect.
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/import.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/index.html.jinja4
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja4
4 files changed, 8 insertions, 4 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/import.html.jinja b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
index 6ec9947..7f3be50 100644
--- a/src/hydrilla/proxy/web_ui/templates/import.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
@@ -103,7 +103,7 @@ code in a proprietary work, I am not going to enforce this in court.
{% if invalid_ad_hoc_patterns is defined %}
{{ error_note(_('web_ui.err.invalid_ad_hoc_patterns')) }}
{% endif %}
- {{ form_field('patterns', height=3) }}
+ {{ form_field('patterns', height=3, initial_value=pattern|default(none)) }}
{{ label(_('web_ui.import.script_text_field_label'), 'script_text') }}
{{ form_field('script_text', required=false, height=15) }}
diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
index 2b49361..ff74369 100644
--- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
@@ -299,4 +299,8 @@ code in a proprietary work, I am not going to enforce this in court.
{{ _('web_ui.home.payloadon_popup_no') }}
{% endif %}
{% endcall %}
+
+ <p>
+ {{ _('web_ui.home.popup_can_be_opened_by') }}
+ </p>
{% endblock main %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
index fe816ab..386c0c8 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
@@ -75,7 +75,7 @@ code in a proprietary work, I am not going to enforce this in court.
{% set encoded = patterns[0]|urlencode|replace('/', '%2F') %}
{%
set url = url_for(
- '.show_payload',
+ '.show_package_library',
item_version_id = version_display_info.ref.id,
pattern = encoded,
lib_identifier = lib_identifier
diff --git a/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
index 6d21ccd..9e4b869 100644
--- a/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/rules/add.html.jinja
@@ -24,14 +24,14 @@ code in a proprietary work, I am not going to enforce this in court.
{% block main %}
<h3>{{ _('web_ui.rules.add.heading') }}</h3>
- <form method="POST">
+ <form method="POST" action="{{ url_for('.add_rule') }}">
{{ label(_('web_ui.rules.add.pattern_field_label'), 'pattern') }}
{% if rule_pattern_invalid is defined %}
{{ error_note(_('web_ui.err.rule_pattern_invalid')) }}
{% endif %}
- {{ form_field('pattern') }}
+ {{ form_field('pattern', initial_value=pattern|default(none)) }}
{{ label(_('web_ui.rules.add.block_or_allow_label'), 'allow') }}