Skip to content
Snippets Groups Projects
Commit e5044ab3 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Wrap whitespace on error description

parent a3dfe210
Branches
No related tags found
No related merge requests found
...@@ -512,6 +512,7 @@ def etherpull_protocol(protocol): ...@@ -512,6 +512,7 @@ def etherpull_protocol(protocol):
@db_lookup(Protocol) @db_lookup(Protocol)
@require_modify_right() @require_modify_right()
def upload_source_to_known_protocol(protocol): def upload_source_to_known_protocol(protocol):
form = KnownProtocolSourceUploadForm()
if form.validate_on_submit(): if form.validate_on_submit():
if form.source.data is None: if form.source.data is None:
flash("Es wurde keine Datei ausgewählt.", "alert-error") flash("Es wurde keine Datei ausgewählt.", "alert-error")
......
...@@ -40,3 +40,7 @@ input[type="file"] { ...@@ -40,3 +40,7 @@ input[type="file"] {
.centered > a { .centered > a {
margin: 8px; margin: 8px;
} }
pre.error-description {
white-space: pre-wrap;
}
...@@ -5,5 +5,8 @@ ...@@ -5,5 +5,8 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
{{render_single_table(error_table)}} {{render_single_table(error_table)}}
<pre class="error-description">
{{-error.description}}
</pre>
</div> </div>
{% endblock %} {% endblock %}
...@@ -283,15 +283,14 @@ class ErrorTable(SingleValueTable): ...@@ -283,15 +283,14 @@ class ErrorTable(SingleValueTable):
super().__init__(error.action, error) super().__init__(error.action, error)
def headers(self): def headers(self):
return ["Protokoll", "Aktion", "Fehler", "Zeitpunkt", "Beschreibung"] return ["Protokoll", "Aktion", "Fehler", "Zeitpunkt"]
def row(self): def row(self):
return [ return [
Table.link(url_for("show_protocol", protocol_id=self.value.protocol.id), self.value.protocol.get_identifier()), Table.link(url_for("show_protocol", protocol_id=self.value.protocol.id), self.value.protocol.get_identifier()),
self.value.action, self.value.action,
self.value.name, self.value.name,
datetime_filter(self.value.datetime), datetime_filter(self.value.datetime)
Markup("<pre>{}</pre>".format(self.value.description))
] ]
class TodosTable(Table): class TodosTable(Table):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment