feat: add connections dashboard with background health checks
- 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>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<ul class="navbar-nav ms-auto">
|
||||
{% if user %}
|
||||
<li class="nav-item">
|
||||
<a href="/evotor" class="nav-link">Эвотор</a>
|
||||
<a href="/connections" class="nav-link">Подключения</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/profile" class="nav-link"><i class="bi bi-person-circle me-1"></i>Личный кабинет</a>
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
<div class="card-body p-5">
|
||||
<i class="bi bi-envelope-check display-4 text-primary mb-3"></i>
|
||||
<h1 class="h4 mb-3">Подтвердите ваш email</h1>
|
||||
<p class="text-muted">Ссылка для подтверждения email выведена в консоль сервера.</p>
|
||||
<p class="text-muted">Скопируйте её и откройте в браузере.</p>
|
||||
<p class="text-muted">Проверьте почту и нажмите на ссылку для подтверждения.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
55
web/templates/connections.html
Normal file
55
web/templates/connections.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% 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 %}
|
||||
@@ -76,8 +76,8 @@
|
||||
</div>
|
||||
|
||||
<div class="mt-3 text-center">
|
||||
<a href="/profile" class="text-muted small">
|
||||
<i class="bi bi-arrow-left me-1"></i>Вернуться в личный кабинет
|
||||
<a href="/connections" class="text-muted small">
|
||||
<i class="bi bi-arrow-left me-1"></i>Вернуться к подключениям
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user