2026-03-06 15:26:49 +03:00
|
|
|
{% extends "base.html" %}
|
2026-03-06 18:40:11 +03:00
|
|
|
{% block title %}Подключения — ЭВОСИНК{% endblock %}
|
2026-03-06 15:26:49 +03:00
|
|
|
|
|
|
|
|
{% block content %}
|
2026-03-06 16:08:19 +03:00
|
|
|
<div class="d-flex align-items-center justify-content-between mb-4">
|
|
|
|
|
<h1 class="h4 mb-0">Подключения</h1>
|
|
|
|
|
<a href="/connections/add" class="btn btn-primary btn-sm">
|
|
|
|
|
<i class="bi bi-plus-lg me-1"></i>Добавить
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2026-03-06 15:26:49 +03:00
|
|
|
|
2026-03-06 16:08:19 +03:00
|
|
|
{% if connections %}
|
2026-03-06 15:26:49 +03:00
|
|
|
<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">
|
2026-03-06 16:08:19 +03:00
|
|
|
{% if conn.is_online %}
|
2026-03-06 15:26:49 +03:00
|
|
|
<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>
|
|
|
|
|
|
2026-03-06 16:08:19 +03:00
|
|
|
<div class="d-flex gap-2">
|
|
|
|
|
<a href="{{ conn.configure_url }}" class="btn btn-outline-primary btn-sm flex-fill">Настроить</a>
|
|
|
|
|
<form method="post" action="/connections/delete?type={{ conn.type }}">
|
|
|
|
|
<button type="submit"
|
|
|
|
|
class="btn btn-outline-danger btn-sm"
|
|
|
|
|
onclick="return confirm('Вы уверены, что хотите отключить {{ conn.name }}?')">
|
|
|
|
|
Отключить
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|
2026-03-06 15:26:49 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
2026-03-06 16:08:19 +03:00
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
<div class="text-center py-5 text-muted">
|
|
|
|
|
<i class="bi bi-plug fs-1 mb-3 d-block"></i>
|
|
|
|
|
<p class="mb-3">Нет подключённых сервисов</p>
|
|
|
|
|
<a href="/connections/add" class="btn btn-primary">
|
|
|
|
|
<i class="bi bi-plus-lg me-1"></i>Добавить подключение
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2026-03-06 15:26:49 +03:00
|
|
|
{% endblock %}
|