aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/sent_source.html
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/templates/sent_source.html')
-rw-r--r--webmentions_ssg/templates/sent_source.html63
1 files changed, 42 insertions, 21 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html
index 6d397f2..8e5932c 100644
--- a/webmentions_ssg/templates/sent_source.html
+++ b/webmentions_ssg/templates/sent_source.html
@@ -77,54 +77,75 @@
<th scope="col">Endpoint</th>
<th scope="col">Response Status</th>
<th scope="col">Status URL</th>
- <th scope="col">Last Attempted at</th>
- <th scope="col">Last Sent at</th>
+ <th scope="col">Last attempted at</th>
+ <th scope="col">Last sent at</th>
</tr>
</thead>
<tbody>
{% for webmention in webmentions %}
- <tr>
+ {% if webmention.status.value == "sent" %}
+ {% set row_class = "table-success" %}
+ {% set badge_class = "text-bg-success" %}
+ {% elif webmention.status.value == "unsupported" %}
+ {% set row_class = "table-warning" %}
+ {% set badge_class = "text-bg-warning" %}
+ {% elif webmention.status.value == "failed" %}
+ {% set row_class = "table-danger" %}
+ {% set badge_class = "text-bg-danger" %}
+ {% else %}
+ {% set row_class = "table-info" %}
+ {% set badge_class = "text-bg-info" %}
+ {% endif %}
+ <tr class="{{ row_class }}">
<td class="text-break">
<a href="{{ webmention.target }}">{{ webmention.target }}</a>
</td>
- <td>{{ webmention.status.value }}</td>
+ <td>
+ {% if webmention.status is not none %}
+ <span class="badge {{ badge_class }}">{{ webmention.status.value.title() }}</span>
+ {% endif %}
+ </td>
<td>
{% if webmention.active %}
<span class="badge text-bg-success">Active</span>
{% else %}
- <span class="badge text-bg-secondary">Removed</span>
+ <span class="badge text-bg-danger">Removed</span>
{% endif %}
</td>
<td>{{ webmention.desired_revision }}</td>
<td>
{{ webmention.processed_revision
- if webmention.processed_revision is not none
- else "—" }}
+ if webmention.processed_revision is not none
+ else "—" }}
</td>
<td>
{{ webmention.sent_revision
- if webmention.sent_revision is not none
- else "—" }}
+ if webmention.sent_revision is not none
+ else "—" }}
</td>
<td>
{{ webmention.failure_reason
- if webmention.failure_reason is not none
- else "—" }}
+ if webmention.failure_reason is not none
+ else "—" }}
</td>
- <td>
- {{ webmention.endpoint
- if webmention.endpoint is not none
- else "—" }}
+ <td class="text-break">
+ {% if webmention.endpoint is not none %}
+ <a href="{{ webmention.endpoint }}">{{ webmention.endpoint }}</a>
+ {% else %}
+ —
+ {% endif %}
</td>
<td>
{{ webmention.response_status
- if webmention.response_status is not none
- else "—" }}
+ if webmention.response_status is not none
+ else "—" }}
</td>
- <td>
- {{ webmention.status_url
- if webmention.status_url is not none
- else "—" }}
+ <td class="text-break">
+ {% if webmention.status_url is not none %}
+ <a href="{{ webmention.status_url }}">{{ webmention.status_url }}</a>
+ {% else %}
+ —
+ {% endif %}
</td>
<td>
{% if webmention.last_attempted_at is not none %}