Add monitoring PF service

This commit is contained in:
Grendgi
2026-06-04 14:55:41 +03:00
commit dd3edd7088
41 changed files with 3194 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
{% extends "base.html" %}
{% block title %}Проекты — DLD Monitor{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-3">
<h3 class="mb-0">Наши проекты</h3>
<a href="{{ url_path('/projects/new') }}" class="btn btn-primary">+ Новый проект</a>
</div>
{% if projects %}
<div class="d-flex gap-2 mb-3">
<div class="stat-chip"><div class="n">{{ projects|length }}</div><div class="small text-muted">проектов</div></div>
<div class="stat-chip"><div class="n">{{ projects|map(attribute='listings')|map('length')|sum }}</div><div class="small text-muted">конкурентов</div></div>
</div>
{% endif %}
{% if not projects %}
<div class="alert alert-light border text-center py-5">
Пока ни одного проекта. <a href="{{ url_path('/projects/new') }}">Добавьте первый</a>.
</div>
{% else %}
<div class="table-responsive bg-white rounded shadow-sm">
<table class="table table-hover align-middle mb-0">
<thead class="table-light">
<tr>
<th>Название</th>
<th>Здание</th>
<th>Тип</th>
<th>Наша цена</th>
<th>Конкуренты</th>
<th>Владелец</th>
<th>Последняя проверка (МСК)</th>
<th></th>
</tr>
</thead>
<tbody>
{% for p in projects %}
<tr>
<td><a href="{{ url_path('/projects/' ~ p.id) }}">{{ p.title }}</a></td>
<td class="small">
{% if p.building %}{{ p.building }}{% else %}—{% endif %}
{% if p.bedrooms is not none %} · {{ p.bedrooms }}BR{% endif %}
</td>
<td>
{% if p.deal_type.value == 'sale' %}
<span class="badge badge-sale">Продажа</span>
{% else %}
<span class="badge badge-rent">Аренда</span>
{% endif %}
</td>
<td>{% if p.our_price %}{{ "{:,.0f}".format(p.our_price).replace(",", " ") }} AED{% else %}—{% endif %}</td>
<td>{{ p.listings|length }}</td>
<td>{{ p.owner.name if p.owner else '—' }}</td>
<td>{{ p.last_checked_at | msk }}</td>
<td>
<form action="{{ url_path('/projects/' ~ p.id ~ '/check') }}" method="post" class="d-inline">
<button class="btn btn-sm btn-outline-primary">Проверить</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}