diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html b/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html index 96e56c4b3..3dc5f4faf 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html @@ -19,40 +19,49 @@
{% csrf_token %} -
+ {% if save_error or form.non_field_errors %} +
-

 {% translate "Elasticsearch Log forwarder" %}

+ {# If there is save/configuration errors #} + {% if save_error %} + +

{% translate "Configuration error" %}

+ {% endif %} + {% if form.non_field_errors %} +

{% translate "Form errors" %}

+ {% endif %}
{# Print form errors correctly #} {% if form.non_field_errors %} -
-

Form errors

-
- {{ form.non_field_errors|safe }} -
+
+ {{ form.non_field_errors|safe }}
{% endif %} {# If there is save/configuration errors #} {% if save_error %} -
{% endif %} +
+
+ {% endif %} +
+
+

 {% translate "Elasticsearch Log forwarder" %}

+
+
diff --git a/vulture_os/services/frontend/views.py b/vulture_os/services/frontend/views.py index f3431d274..9e5f63e06 100644 --- a/vulture_os/services/frontend/views.py +++ b/vulture_os/services/frontend/views.py @@ -363,7 +363,7 @@ def render_form(front, **kwargs): reputationctx_ids = json_loads(request.POST.get('reputation_contexts', "[]")) assert isinstance(reputationctx_ids, list), "reputation_contexts field must be a list." except Exception as e: - return render_form(frontend, save_error=["Error in ReputationConext field : {}".format(e), + return render_form(frontend, save_error=["Error in ReputationContext field : {}".format(e), str.join('', format_exception(*exc_info()))]) """ For each reputation_context in list """ diff --git a/vulture_os/services/templates/services/frontend_edit.html b/vulture_os/services/templates/services/frontend_edit.html index e2795e194..4f6fff3c5 100644 --- a/vulture_os/services/templates/services/frontend_edit.html +++ b/vulture_os/services/templates/services/frontend_edit.html @@ -35,7 +35,7 @@

{% translate "Form errors
{# Print form errors correctly #} {% if form.non_field_errors %} -
+
{{ form.non_field_errors|safe }}
{% endif %} @@ -56,6 +56,9 @@

{% translate "Form errors

{% endif %}
+
+

 {% translate "Listeners" %}

+