Commit e5044ab3 authored by Robin Sonnabend's avatar Robin Sonnabend

Wrap whitespace on error description

parent a3dfe210
......@@ -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")
......
......@@ -40,3 +40,7 @@ input[type="file"] {
.centered > a {
margin: 8px;
}
pre.error-description {
white-space: pre-wrap;
}
......@@ -5,5 +5,8 @@
{% block content %}
<div class="container">
{{render_single_table(error_table)}}
<pre class="error-description">
{{-error.description}}
</pre>
</div>
{% endblock %}
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment