Files
devplacepy/devplacepy/templates/services.html
T
retoor 741d7aade6
DevPlace CI / test (push) Failing after 2m7s
docs: add block/mute user relations, emoji-sync CLI, and uid indexes
- Add `/block`, `/mute` endpoints with block/unblock and mute/unmute functionality in `routers/relations.py`, hiding blocked users' content everywhere except their own profile while muting only suppresses notifications
- Introduce `devplace emoji-sync` CLI command to regenerate `static/js/emoji-shortcodes.js` from the emoji library, documented in `CLAUDE.md` and wired in `cli.py`
- Create `get_blocked_uids()` database helper and apply it in `content.py` `load_detail()` to filter blocked users' posts from detail views
- Implement `_uid_index()` and `_drop_index()` helpers in `database.py` for unique uid indexes across tables, with `user_relations` added to `SOFT_DELETE_TABLES`
- Document new routes in `AGENTS.md` and `README.md`, including emoji shortcodes rendering behavior distinct from the emoji picker
2026-06-19 08:06:09 +00:00

53 lines
2.2 KiB
HTML

{% extends "admin_base.html" %}
{% block extra_head %}
{{ super() }}
<link rel="stylesheet" href="{{ static_url('/static/css/services.css') }}">
{% endblock %}
{% block admin_content %}
<div class="admin-toolbar">
<h2>Services</h2>
<span class="admin-count">{{ services|length }} services</span>
</div>
<div class="admin-table-wrap">
<table class="admin-table services-index" id="services-list">
<caption class="sr-only">Background services</caption>
<thead>
<tr>
<th scope="col">Service</th>
<th scope="col">Status</th>
<th scope="col">Uptime</th>
<th scope="col">Last run</th>
<th scope="col">Next run</th>
<th scope="col">Interval</th>
<th scope="col"><span class="sr-only">Actions</span></th>
</tr>
</thead>
<tbody>
{% for svc in services %}
<tr class="service-row" data-service="{{ svc.name }}">
<td>
<a class="service-row-name" href="/admin/services/{{ svc.name }}">{{ svc.title }}</a>
{% if svc.description %}<div class="service-row-desc">{{ svc.description }}</div>{% endif %}
</td>
<td><span class="service-status {{ svc.status }}">{{ svc.status }}</span></td>
<td data-meta="uptime">{{ svc.uptime or "-" }}</td>
<td data-meta="last_run">{% if svc.last_run %}{{ format_date(svc.last_run, include_time=True) }}{% else %}-{% endif %}</td>
<td data-meta="next_run">{% if svc.next_run %}{{ format_date(svc.next_run, include_time=True) }}{% else %}-{% endif %}</td>
<td data-meta="interval">every {{ svc.interval_seconds }}s</td>
<td><a class="admin-btn admin-btn-sm" href="/admin/services/{{ svc.name }}">Manage &rarr;</a></td>
</tr>
{% else %}
<tr><td colspan="7" class="admin-empty">No services registered.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block extra_js %}
<script type="module" src="{{ static_url('/static/js/ServiceMonitor.js') }}"></script>
<script type="module">
new window.ServiceMonitor().start();
</script>
{% endblock %}