aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/sent_source.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/templates/sent_source.html155
1 files changed, 155 insertions, 0 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html
new file mode 100644
index 0000000..6d397f2
--- /dev/null
+++ b/webmentions_ssg/templates/sent_source.html
@@ -0,0 +1,155 @@
+{% extends "base.html" %}
+{% block content %}
+ <div class="mb-3">
+ <a href="{{ url_for("root.sent") }}">&larr; Back to sources</a>
+ </div>
+ <div class="d-flex justify-content-between align-items-start mb-3">
+ <h1 class="mb-0">Source Details</h1>
+ </div>
+ <div class="d-flex justify-content-between align-items-start mb-3">
+ <dl class="row">
+ <dt class="col-sm-2">UUID</dt>
+ <dd class="col-sm-4">
+ {{ source.uuid }}
+ </dd>
+ <dt class="col-sm-2">Hash</dt>
+ <dd class="col-sm-4">
+ {{ source.content_hash }}
+ </dd>
+ <dt class="col-sm-2">Path</dt>
+ <dd class="col-sm-4">
+ {{ source.path }}
+ </dd>
+ <dt class="col-sm-2">URL</dt>
+ <dd class="col-sm-4">
+ <a href="{{ source.url }}" class="text-break">{{ source.url }}</a>
+ </dd>
+ <dt class="col-sm-2">Created at</dt>
+ <dd class="col-sm-4">
+ <time datetime="{{ source.created_at.isoformat() }}">
+ {{ source.created_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ </dd>
+ <dt class="col-sm-2">Last seen at</dt>
+ <dd class="col-sm-4">
+ <time datetime="{{ source.last_seen_at.isoformat() }}">
+ {{ source.last_seen_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ </dd>
+ <dt class="col-sm-2">Revised at</dt>
+ <dd class="col-sm-4">
+ <time datetime="{{ source.revised_at.isoformat() }}">
+ {{ source.revised_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ </dd>
+ <dt class="col-sm-2">Deleted at</dt>
+ <dd class="col-sm-4">
+ {% if source.deleted_at is none %}
+ N/A
+ {% else %}
+ <time datetime="{{ source.deleted_at.isoformat() }}">
+ {{ source.deleted_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ {% endif %}
+ </dd>
+ <dt class="col-sm-2">Revision</dt>
+ <dd class="col-sm-4">
+ {{ source.revision }}
+ </dd>
+ </dl>
+ </div>
+ <div class="d-flex justify-content-between align-items-start mb-3">
+ <h2 class="mb-0">Sent Webmentions</h2>
+ <span class="text-body-secondary">{{ webmentions | length }} webmentions</span>
+ </div>
+ {% if webmentions %}
+ <div class="table-responsive">
+ <table class="table table-bordered table-striped table-hover align-middle">
+ <thead>
+ <tr>
+ <th scope="col">Target</th>
+ <th scope="col">Status</th>
+ <th scope="col">Active</th>
+ <th scope="col">Desired revision</th>
+ <th scope="col">Processed revision</th>
+ <th scope="col">Sent revision</th>
+ <th scope="col">Failure Reason</th>
+ <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>
+ </tr>
+ </thead>
+ <tbody>
+ {% for webmention in webmentions %}
+ <tr>
+ <td class="text-break">
+ <a href="{{ webmention.target }}">{{ webmention.target }}</a>
+ </td>
+ <td>{{ webmention.status.value }}</td>
+ <td>
+ {% if webmention.active %}
+ <span class="badge text-bg-success">Active</span>
+ {% else %}
+ <span class="badge text-bg-secondary">Removed</span>
+ {% endif %}
+ </td>
+ <td>{{ webmention.desired_revision }}</td>
+ <td>
+ {{ webmention.processed_revision
+ if webmention.processed_revision is not none
+ else "—" }}
+ </td>
+ <td>
+ {{ webmention.sent_revision
+ if webmention.sent_revision is not none
+ else "—" }}
+ </td>
+ <td>
+ {{ webmention.failure_reason
+ if webmention.failure_reason is not none
+ else "—" }}
+ </td>
+ <td>
+ {{ webmention.endpoint
+ if webmention.endpoint is not none
+ else "—" }}
+ </td>
+ <td>
+ {{ webmention.response_status
+ if webmention.response_status is not none
+ else "—" }}
+ </td>
+ <td>
+ {{ webmention.status_url
+ if webmention.status_url is not none
+ else "—" }}
+ </td>
+ <td>
+ {% if webmention.last_attempted_at is not none %}
+ <time datetime="{{ webmention.last_attempted_at.isoformat() }}">
+ {{ webmention.last_attempted_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ {% else %}
+ —
+ {% endif %}
+ </td>
+ <td>
+ {% if webmention.last_sent_at is not none %}
+ <time datetime="{{ webmention.last_sent_at.isoformat() }}">
+ {{ webmention.last_sent_at.strftime("%Y-%m-%d %H:%M:%S") }}
+ </time>
+ {% else %}
+ —
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ {% else %}
+ <p class="text-body-secondary">No Webmentions have been discovered for this source.</p>
+ {% endif %}
+{% endblock %}