Display fetchmail errors to the user, fixes #23

This commit is contained in:
Pierre Jaury
2016-09-10 13:05:55 +02:00
parent 709869d4ba
commit 2cb4a44b5a
5 changed files with 53 additions and 18 deletions

View File

@@ -208,3 +208,5 @@ class Fetch(Base):
tls = db.Column(db.Boolean(), nullable=False)
username = db.Column(db.String(255), nullable=False)
password = db.Column(db.String(255), nullable=False)
last_check = db.Column(db.DateTime, nullable=True)
error = db.Column(db.String(1023), nullable=True)

View File

@@ -17,11 +17,10 @@ Fetched accounts
<tbody>
<tr>
<th>Actions</th>
<th>Protocol</th>
<th>Hostname</th>
<th>Port</th>
<th>TLS</th>
<th>Endpoint</th>
<th>Username</th>
<th>Last check</th>
<th>Status</th>
<th>Created</th>
<th>Last edit</th>
</tr>
@@ -31,11 +30,10 @@ Fetched accounts
<a href="{{ url_for('.fetch_edit', fetch_id=fetch.id) }}" title="Edit"><i class="fa fa-pencil"></i></a>&nbsp;
<a href="{{ url_for('.fetch_delete', fetch_id=fetch.id) }}" title="Delete"><i class="fa fa-trash"></i></a>
</td>
<td>{{ fetch.protocol }}</td>
<td>{{ fetch.host }}</td>
<td>{{ fetch.port }}</td>
<td>{{ fetch.tls }}</td>
<td>{{ fetch.protocol }}{{ 's' if fetch.tls else '' }}://{{ fetch.host }}:{{ fetch.port }}</td>
<td>{{ fetch.username }}</td>
<td>{{ fetch.last_check or '-' }}</td>
<td>{{ fetch.error or '-' }}</td>
<td>{{ fetch.created_at }}</td>
<td>{{ fetch.updated_at or '' }}</td>
</tr>