7 lines
1.5 KiB
HTML
7 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Sources · What2Do{% endblock %}
|
|
{% block content %}
|
|
<div class="section-head"><div><div class="eyebrow">CRAWLER ADMIN</div><div class="form-title">Sources</div><div class="muted">Configure crawlers and manage their normalized events.</div></div><a class="button" href="/sources/new">+ Add website</a></div>
|
|
<div class="source-grid">{% for source in sources %}<article class="card source"><div class="source-title"><div><h3>{{ source.name }}</h3><a href="{{ source.url }}" target="_blank" rel="noopener">{{ source.url }}</a></div><span class="pill {{ 'good' if source.enabled else '' }}">{{ 'Enabled' if source.enabled else 'Paused' }}</span></div><div class="source-stats"><div><small>Venue</</small>small><strong>{{ source.venue_name }}</strong></div><div><small>Events</small></small><strong>{{ source.event_count }}</strong></div><div><small></small>Last result</small><strong>{{ source.last_status or 'Not crawled' }}</strong></div></div>{% if source.last_error %}<div class="notice error">{{ source.last_error }}</div>{% endif %}<div class="actions"><form method="post" action="/sources/{{ source.id }}/crawl"><button>Crawl now</button></form><a class="button secondary" href="/sources/{{ source.id }}">Configure</a><a class="button secondary" href="/sources/{{ source.id }}/events">Manage events</a><form method="post" action="/sources/{{ source.id }}/delete" onsubmit="return confirm('Delete this source and its events?')"><button class="danger">Delete</button></form></div></article>{% endfor %}</div>
|
|
{% endblock %}
|