- Add /connections page showing all integrations with online/offline status - Add background health checker that polls Evotor API every 10 minutes - Add is_online and last_checked_at fields to evotor_connections table - Replace Evotor navbar link with unified Connections link - Redirect connect/disconnect flows to /connections - Add Alembic migration for new columns Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
56 lines
2.4 KiB
HTML
56 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Подключения — EvoSync{% endblock %}
|
||
|
||
{% block content %}
|
||
<h1 class="h4 mb-4">Подключения</h1>
|
||
|
||
<div class="row g-3">
|
||
{% for conn in connections %}
|
||
<div class="col-sm-6 col-lg-4">
|
||
<div class="card shadow-sm h-100">
|
||
<div class="card-body">
|
||
<div class="d-flex align-items-center mb-3">
|
||
<i class="bi {{ conn.icon }} fs-2 me-3 text-secondary"></i>
|
||
<div>
|
||
<h5 class="mb-0">{{ conn.name }}</h5>
|
||
{% if conn.details %}
|
||
<small class="text-muted">{{ conn.details }}</small>
|
||
{% endif %}
|
||
</div>
|
||
<div class="ms-auto">
|
||
{% if not conn.connected %}
|
||
<i class="bi bi-circle text-secondary fs-5" title="Не подключено"></i>
|
||
{% elif conn.is_online %}
|
||
<i class="bi bi-circle-fill text-success fs-5" title="Онлайн"></i>
|
||
{% else %}
|
||
<i class="bi bi-circle-fill text-danger fs-5" title="Офлайн"></i>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
|
||
<div class="d-grid gap-2">
|
||
{% if conn.connected %}
|
||
<a href="{{ conn.connect_url }}" class="btn btn-outline-primary btn-sm">Переподключить</a>
|
||
<form method="post" action="{{ conn.disconnect_url }}">
|
||
<button type="submit" class="btn btn-outline-danger btn-sm w-100">Отключить</button>
|
||
</form>
|
||
{% else %}
|
||
<a href="{{ conn.connect_url }}" class="btn btn-primary btn-sm">Подключить</a>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
{% if conn.connected %}
|
||
<div class="card-footer text-muted small">
|
||
{% if conn.last_checked_at %}
|
||
Проверено: {{ conn.last_checked_at.strftime("%d.%m.%Y %H:%M") }}
|
||
{% else %}
|
||
Статус ещё не проверялся
|
||
{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% endblock %}
|