diff --git a/server.py b/server.py index 70a88f58434d8cb5486afca56656b68729bc2a23..94b848935f51f514883ea16bdcefbdb27d254f82 100755 --- a/server.py +++ b/server.py @@ -512,6 +512,7 @@ def etherpull_protocol(protocol): @db_lookup(Protocol) @require_modify_right() def upload_source_to_known_protocol(protocol): + form = KnownProtocolSourceUploadForm() if form.validate_on_submit(): if form.source.data is None: flash("Es wurde keine Datei ausgewählt.", "alert-error") diff --git a/static/css/style.css b/static/css/style.css index 69c9292e603b4c45f35643c4a4783e8f9894a68d..5bc6b059a48c3f6c174e49960e36278205f4cfb6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -40,3 +40,7 @@ input[type="file"] { .centered > a { margin: 8px; } + +pre.error-description { + white-space: pre-wrap; +} diff --git a/templates/error-show.html b/templates/error-show.html index a3d06145c0f33fba844de8c8b0a1bb651f3140d5..aae00c98de0c6f1a24a3fcb681ede9a79447ee00 100644 --- a/templates/error-show.html +++ b/templates/error-show.html @@ -5,5 +5,8 @@ {% block content %} <div class="container"> {{render_single_table(error_table)}} + <pre class="error-description"> + {{-error.description}} + </pre> </div> {% endblock %} diff --git a/views/tables.py b/views/tables.py index 9e6227364cdcfc0ae4fa41ce2740f635b6ff2756..ff7ecd1408c3aca578cdcf8b287aa6a01296870b 100644 --- a/views/tables.py +++ b/views/tables.py @@ -283,15 +283,14 @@ class ErrorTable(SingleValueTable): super().__init__(error.action, error) def headers(self): - return ["Protokoll", "Aktion", "Fehler", "Zeitpunkt", "Beschreibung"] + return ["Protokoll", "Aktion", "Fehler", "Zeitpunkt"] def row(self): return [ Table.link(url_for("show_protocol", protocol_id=self.value.protocol.id), self.value.protocol.get_identifier()), self.value.action, self.value.name, - datetime_filter(self.value.datetime), - Markup("<pre>{}</pre>".format(self.value.description)) + datetime_filter(self.value.datetime) ] class TodosTable(Table):