aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/received.html
diff options
context:
space:
mode:
authorDennis Fink2026-11-17 19:43:04 +0100
committerDennis Fink2026-11-17 19:43:04 +0100
commit5e24e8307f650e72881f747661a2b6e52db15f2d (patch)
tree585b456b9439a17957e8633f566c0725bb9d8595 /webmentions_ssg/templates/received.html
parent6d6d079a3a99d3d3a922a640b6925eb2adf044de (diff)
downloadwebmentions-ssg-5e24e8307f650e72881f747661a2b6e52db15f2d.tar.gz
webmentions-ssg-5e24e8307f650e72881f747661a2b6e52db15f2d.zip
feat(receiver): add Webmention detail and status history
Add an authenticated detail view with full failure information, timestamps, actions, public status links, and recorded lifecycle transitions. Persist verification and resubmission events, backfill existing rows during migration, and clean up history when received Webmentions are deleted.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/templates/received.html132
1 files changed, 55 insertions, 77 deletions
diff --git a/webmentions_ssg/templates/received.html b/webmentions_ssg/templates/received.html
index 5fd9866..b8099aa 100644
--- a/webmentions_ssg/templates/received.html
+++ b/webmentions_ssg/templates/received.html
@@ -160,85 +160,63 @@ SPDX-License-Identifier: BSD-3-Clause
data-confirm-class="btn-danger">Delete all declined</button>
</div>
{% if webmentions.items %}
- <table class="table table-bordered table-striped table-hover align-middle">
- <thead>
- <tr>
- <th scope="col">
- <input type="checkbox"
- class="form-check-input"
- id="received-select-all"
- aria-label="Select all Webmentions on this page">
- </th>
- {{ sortable_header('Status', 'status') }}
- {{ sortable_header('Source', 'source') }}
- {{ sortable_header('Target', 'target') }}
- {{ sortable_header('Received', 'received') }}
- {{ sortable_header('Updated', 'updated') }}
- <th scope="col">Reason</th>
- <th scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
- {% for webmention in webmentions %}
- {% set style = received_status_presentation.get(webmention.status, {"row_class": "table-danger", "badge_class": "text-bg-danger", "label": "Declined"}) %}
- <tr class="{{ style.row_class }}">
- <td>
+ <div class="table-responsive">
+ <table class="table table-bordered table-striped table-hover align-middle">
+ <thead>
+ <tr>
+ <th scope="col">
<input type="checkbox"
- class="form-check-input received-select"
- value="{{ webmention.uuid }}"
- aria-label="Select webmention {{ webmention.uuid }}">
- </td>
- <td><span class="badge {{ style.badge_class }}">{{ style.label }}</span></td>
- <td class="text-break">
- <a href="{{ webmention.source }}">{{ webmention.source }}</a>
- </td>
- <td class="text-break">
- <a href="{{ webmention.target }}">{{ webmention.target }}</a>
- </td>
- <td class="text-nowrap">
- <time datetime="{{ webmention.created_at.isoformat() }}">
- {{ webmention.created_at.strftime("%Y-%m-%d %H:%M:%S") }}
- </time>
- </td>
- <td class="text-nowrap">
- <time datetime="{{ webmention.updated_at.isoformat() }}">
- {{ webmention.updated_at.strftime("%Y-%m-%d %H:%M:%S") }}
- </time>
- </td>
- <td>{{ webmention.failure_reason or "—" }}</td>
- <td class="text-nowrap">
- <button type="button"
- class="btn btn-sm btn-primary"
- data-bs-toggle="modal"
- data-bs-target="#confirmation-modal"
- data-action="{{ url_for('webmentions.reverify_received_webmention', webmention_uuid=webmention.uuid, page=webmentions.page, **filters) }}"
- data-title="Reverify webmention?"
- data-message="The webmention will be fetched and verified again."
- data-confirm-label="Reverify"
- data-confirm-class="btn-primary">Reverify</button>
- <button type="button"
- class="btn btn-sm btn-warning"
- data-bs-toggle="modal"
- data-bs-target="#confirmation-modal"
- data-action="{{ url_for('webmentions.block_received_source', webmention_uuid=webmention.uuid, page=webmentions.page, **filters) }}"
- data-title="Block this source domain?"
- data-message="Future Webmentions from this source hostname and its subdomains will be rejected."
- data-confirm-label="Block domain"
- data-confirm-class="btn-warning">Block this domain</button>
- <button type="button"
- class="btn btn-sm btn-danger"
- data-bs-toggle="modal"
- data-bs-target="#confirmation-modal"
- data-action="{{ url_for('webmentions.delete_received_webmention', webmention_uuid=webmention.uuid, page=webmentions.page, **filters) }}"
- data-title="Delete webmention?"
- data-message="This permanently deletes the webmention and cannot be undone."
- data-confirm-label="Delete"
- data-confirm-class="btn-danger">Delete</button>
- </td>
+ class="form-check-input"
+ id="received-select-all"
+ aria-label="Select all Webmentions on this page">
+ </th>
+ {{ sortable_header('Status', 'status') }}
+ {{ sortable_header('Source', 'source') }}
+ {{ sortable_header('Target', 'target') }}
+ {{ sortable_header('Received', 'received') }}
+ {{ sortable_header('Updated', 'updated') }}
+ <th scope="col">Details</th>
</tr>
- {% endfor %}
- </tbody>
- </table>
+ </thead>
+ <tbody>
+ {% for webmention in webmentions %}
+ {% set style = received_status_presentation.get(webmention.status, {"row_class": "table-danger", "badge_class": "text-bg-danger", "label": "Declined"}) %}
+ <tr class="{{ style.row_class }}">
+ <td>
+ <input type="checkbox"
+ class="form-check-input received-select"
+ value="{{ webmention.uuid }}"
+ aria-label="Select webmention {{ webmention.uuid }}">
+ </td>
+ <td><span class="badge {{ style.badge_class }}">{{ style.label }}</span></td>
+ <td>
+ <a href="{{ webmention.source }}">{{ webmention.source }}</a>
+ </td>
+ <td>
+ <a href="{{ webmention.target }}">{{ webmention.target }}</a>
+ </td>
+ <td class="text-nowrap">
+ <time datetime="{{ webmention.created_at.isoformat() }}"
+ title="{{ webmention.created_at.strftime('%Y-%m-%d %H:%M:%S') }} UTC">
+ {{ webmention.created_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ </td>
+ <td class="text-nowrap">
+ <time datetime="{{ webmention.updated_at.isoformat() }}"
+ title="{{ webmention.updated_at.strftime('%Y-%m-%d %H:%M:%S') }} UTC">
+ {{ webmention.updated_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ </td>
+ <td>
+ <a class="btn btn-sm btn-primary"
+ href="{{ url_for('webmentions.received_detail', webmention_uuid=webmention.uuid, page=webmentions.page, **filters) }}"
+ aria-label="Details for Webmention {{ webmention.uuid }}">Details</a>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
{% if webmentions.pages > 1 %}
<div class="mt-3">{{ render_pagination(webmentions, args=filters) }}</div>
{% endif %}