Compare commits
2 Commits
v202603010
...
v202603011
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f2ffd432b | ||
|
|
c9dec066f7 |
@@ -17,6 +17,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|||||||
- 15 new tests in `web/tests/test_affiliate.py` (41 total)
|
- 15 new tests in `web/tests/test_affiliate.py` (41 total)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- **Data Platform admin view showing stale/zero row counts** — Docker web containers were mounting `/opt/padelnomics/data` (stale copy) instead of `/data/padelnomics` (live supervisor output). Fixed volume mount in all 6 containers (blue/green × app/worker/scheduler) and added `LANDING_DIR=/app/data/pipeline/landing` so extraction stats and landing zone file stats are visible to the web app.
|
||||||
|
- **`workflows.toml` never found in dev** — `_REPO_ROOT` in `pipeline_routes.py` used `parents[5]` (one level too far up) instead of `parents[4]`. Workflow schedules now display correctly on the pipeline overview tab in dev.
|
||||||
- **Article preview frontmatter bug** — `_rebuild_article()` in `admin/routes.py` now strips YAML frontmatter before passing markdown to `mistune.html()`, preventing raw `title:`, `slug:` etc. from appearing as visible text in article previews.
|
- **Article preview frontmatter bug** — `_rebuild_article()` in `admin/routes.py` now strips YAML frontmatter before passing markdown to `mistune.html()`, preventing raw `title:`, `slug:` etc. from appearing as visible text in article previews.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -60,9 +60,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -82,9 +83,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
|
||||||
@@ -98,9 +100,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
|
||||||
@@ -115,9 +118,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -137,9 +141,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
|
||||||
@@ -153,9 +158,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DATABASE_PATH=/app/data/app.db
|
- DATABASE_PATH=/app/data/app.db
|
||||||
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
- SERVING_DUCKDB_PATH=/app/data/pipeline/analytics.duckdb
|
||||||
|
- LANDING_DIR=/app/data/pipeline/landing
|
||||||
volumes:
|
volumes:
|
||||||
- app-data:/app/data
|
- app-data:/app/data
|
||||||
- /opt/padelnomics/data:/app/data/pipeline:ro
|
- /data/padelnomics:/app/data/pipeline:ro
|
||||||
networks:
|
networks:
|
||||||
- net
|
- net
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ _LANDING_DIR = os.environ.get("LANDING_DIR", "data/landing")
|
|||||||
_SERVING_DUCKDB_PATH = os.environ.get("SERVING_DUCKDB_PATH", "data/analytics.duckdb")
|
_SERVING_DUCKDB_PATH = os.environ.get("SERVING_DUCKDB_PATH", "data/analytics.duckdb")
|
||||||
|
|
||||||
# Repo root: web/src/padelnomics/admin/ → up 4 levels
|
# Repo root: web/src/padelnomics/admin/ → up 4 levels
|
||||||
_REPO_ROOT = Path(__file__).resolve().parents[5]
|
_REPO_ROOT = Path(__file__).resolve().parents[4]
|
||||||
_WORKFLOWS_TOML = _REPO_ROOT / "infra" / "supervisor" / "workflows.toml"
|
_WORKFLOWS_TOML = _REPO_ROOT / "infra" / "supervisor" / "workflows.toml"
|
||||||
|
|
||||||
# A "running" row older than this is considered stale/crashed.
|
# A "running" row older than this is considered stale/crashed.
|
||||||
|
|||||||
@@ -3037,6 +3037,7 @@ async def outreach():
|
|||||||
current_search=search,
|
current_search=search,
|
||||||
current_follow_up=follow_up,
|
current_follow_up=follow_up,
|
||||||
page=page,
|
page=page,
|
||||||
|
outreach_email=EMAIL_ADDRESSES["outreach"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,10 @@
|
|||||||
.admin-subnav {
|
.admin-subnav {
|
||||||
display: flex; align-items: stretch; padding: 0 2rem;
|
display: flex; align-items: stretch; padding: 0 2rem;
|
||||||
background: #fff; border-bottom: 1px solid #E2E8F0;
|
background: #fff; border-bottom: 1px solid #E2E8F0;
|
||||||
flex-shrink: 0; overflow-x: auto; gap: 0;
|
flex-shrink: 0; overflow-x: auto; overflow-y: hidden; gap: 0;
|
||||||
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
.admin-subnav::-webkit-scrollbar { display: none; }
|
||||||
.admin-subnav a {
|
.admin-subnav a {
|
||||||
display: flex; align-items: center; gap: 5px;
|
display: flex; align-items: center; gap: 5px;
|
||||||
padding: 0 1px; margin: 0 13px 0 0; height: 42px;
|
padding: 0 1px; margin: 0 13px 0 0; height: 42px;
|
||||||
|
|||||||
@@ -3,6 +3,19 @@
|
|||||||
|
|
||||||
{% block title %}Admin Dashboard - {{ config.APP_NAME }}{% endblock %}
|
{% block title %}Admin Dashboard - {{ config.APP_NAME }}{% endblock %}
|
||||||
|
|
||||||
|
{% block admin_head %}
|
||||||
|
<style>
|
||||||
|
.funnel-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.funnel-grid { grid-template-columns: repeat(5, 1fr); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block admin_content %}
|
{% block admin_content %}
|
||||||
<header class="flex justify-between items-center mb-8">
|
<header class="flex justify-between items-center mb-8">
|
||||||
<div>
|
<div>
|
||||||
@@ -47,7 +60,7 @@
|
|||||||
|
|
||||||
<!-- Lead Funnel -->
|
<!-- Lead Funnel -->
|
||||||
<p class="text-xs font-semibold text-slate uppercase tracking-wider mb-2">Lead Funnel</p>
|
<p class="text-xs font-semibold text-slate uppercase tracking-wider mb-2">Lead Funnel</p>
|
||||||
<div style="display:grid;grid-template-columns:repeat(5,1fr);gap:0.75rem" class="mb-8">
|
<div class="funnel-grid mb-8">
|
||||||
<div class="card text-center border-l-4 border-l-electric" style="padding:0.75rem">
|
<div class="card text-center border-l-4 border-l-electric" style="padding:0.75rem">
|
||||||
<p class="text-xs text-slate">Planner Users</p>
|
<p class="text-xs text-slate">Planner Users</p>
|
||||||
<p class="text-xl font-bold text-navy">{{ stats.planner_users }}</p>
|
<p class="text-xl font-bold text-navy">{{ stats.planner_users }}</p>
|
||||||
@@ -72,7 +85,7 @@
|
|||||||
|
|
||||||
<!-- Supplier Stats -->
|
<!-- Supplier Stats -->
|
||||||
<p class="text-xs font-semibold text-slate uppercase tracking-wider mb-2">Supplier Funnel</p>
|
<p class="text-xs font-semibold text-slate uppercase tracking-wider mb-2">Supplier Funnel</p>
|
||||||
<div style="display:grid;grid-template-columns:repeat(5,1fr);gap:0.75rem" class="mb-8">
|
<div class="funnel-grid mb-8">
|
||||||
<div class="card text-center border-l-4 border-l-accent" style="padding:0.75rem">
|
<div class="card text-center border-l-4 border-l-accent" style="padding:0.75rem">
|
||||||
<p class="text-xs text-slate">Claimed Suppliers</p>
|
<p class="text-xs text-slate">Claimed Suppliers</p>
|
||||||
<p class="text-xl font-bold text-navy">{{ stats.suppliers_claimed }}</p>
|
<p class="text-xl font-bold text-navy">{{ stats.suppliers_claimed }}</p>
|
||||||
|
|||||||
@@ -2,13 +2,30 @@
|
|||||||
{% set admin_page = "outreach" %}
|
{% set admin_page = "outreach" %}
|
||||||
{% block title %}Outreach Pipeline - Admin - {{ config.APP_NAME }}{% endblock %}
|
{% block title %}Outreach Pipeline - Admin - {{ config.APP_NAME }}{% endblock %}
|
||||||
|
|
||||||
|
{% block admin_head %}
|
||||||
|
<style>
|
||||||
|
.pipeline-status-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 0.75rem;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
@media (min-width: 640px) {
|
||||||
|
.pipeline-status-grid { grid-template-columns: repeat(3, 1fr); }
|
||||||
|
}
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.pipeline-status-grid { grid-template-columns: repeat(6, 1fr); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block admin_content %}
|
{% block admin_content %}
|
||||||
<header class="flex justify-between items-center mb-6">
|
<header class="flex justify-between items-center mb-6">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="text-2xl">Outreach</h1>
|
<h1 class="text-2xl">Outreach</h1>
|
||||||
<p class="text-sm text-slate mt-1">
|
<p class="text-sm text-slate mt-1">
|
||||||
{{ pipeline.total }} supplier{{ 's' if pipeline.total != 1 else '' }} in pipeline
|
{{ pipeline.total }} supplier{{ 's' if pipeline.total != 1 else '' }} in pipeline
|
||||||
· Sending domain: <span class="mono text-xs">hello.padelnomics.io</span>
|
· Sending from: <span class="mono text-xs">{{ outreach_email }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
@@ -18,7 +35,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- Pipeline cards -->
|
<!-- Pipeline cards -->
|
||||||
<div style="display:grid;grid-template-columns:repeat(6,1fr);gap:0.75rem;margin-bottom:1.5rem">
|
<div class="pipeline-status-grid">
|
||||||
{% set status_colors = {
|
{% set status_colors = {
|
||||||
'prospect': '#E2E8F0',
|
'prospect': '#E2E8F0',
|
||||||
'contacted': '#DBEAFE',
|
'contacted': '#DBEAFE',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{% if emails %}
|
{% if emails %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div style="overflow-x:auto">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card text-center" style="padding:2rem">
|
<div class="card text-center" style="padding:2rem">
|
||||||
<p class="text-slate">No emails match the current filters.</p>
|
<p class="text-slate">No emails match the current filters.</p>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
{% if leads %}
|
{% if leads %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div style="overflow-x:auto">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
{% if total > per_page %}
|
{% if total > per_page %}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{% if suppliers %}
|
{% if suppliers %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div style="overflow-x:auto">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card text-center" style="padding:2rem">
|
<div class="card text-center" style="padding:2rem">
|
||||||
<p class="text-slate">No suppliers match the current filters.</p>
|
<p class="text-slate">No suppliers match the current filters.</p>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{% if suppliers %}
|
{% if suppliers %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div style="overflow-x:auto">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card text-center" style="padding:2rem">
|
<div class="card text-center" style="padding:2rem">
|
||||||
<p class="text-slate">No suppliers match the current filters.</p>
|
<p class="text-slate">No suppliers match the current filters.</p>
|
||||||
|
|||||||
@@ -4,6 +4,15 @@
|
|||||||
|
|
||||||
{% block admin_head %}
|
{% block admin_head %}
|
||||||
<style>
|
<style>
|
||||||
|
.pipeline-stat-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.pipeline-stat-grid { grid-template-columns: repeat(4, 1fr); }
|
||||||
|
}
|
||||||
|
|
||||||
.pipeline-tabs {
|
.pipeline-tabs {
|
||||||
display: flex; gap: 0; border-bottom: 2px solid #E2E8F0; margin-bottom: 1.5rem;
|
display: flex; gap: 0; border-bottom: 2px solid #E2E8F0; margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
@@ -46,7 +55,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- Health stat cards -->
|
<!-- Health stat cards -->
|
||||||
<div style="display:grid;grid-template-columns:repeat(4,1fr);gap:0.75rem" class="mb-6">
|
<div class="pipeline-stat-grid mb-6">
|
||||||
<div class="card text-center" style="padding:0.875rem">
|
<div class="card text-center" style="padding:0.875rem">
|
||||||
<p class="text-xs text-slate">Total Runs</p>
|
<p class="text-xs text-slate">Total Runs</p>
|
||||||
<p class="text-2xl font-bold text-navy metric">{{ summary.total | default(0) }}</p>
|
<p class="text-2xl font-bold text-navy metric">{{ summary.total | default(0) }}</p>
|
||||||
|
|||||||
@@ -218,9 +218,7 @@
|
|||||||
.nav-bar[data-navopen="true"] .nav-mobile {
|
.nav-bar[data-navopen="true"] .nav-mobile {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.nav-mobile a,
|
.nav-mobile a:not(.nav-auth-btn) {
|
||||||
.nav-mobile button.nav-auth-btn,
|
|
||||||
.nav-mobile a.nav-auth-btn {
|
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0.625rem 0;
|
padding: 0.625rem 0;
|
||||||
border-bottom: 1px solid #F1F5F9;
|
border-bottom: 1px solid #F1F5F9;
|
||||||
@@ -230,15 +228,18 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: color 0.15s;
|
transition: color 0.15s;
|
||||||
}
|
}
|
||||||
.nav-mobile a:last-child { border-bottom: none; }
|
.nav-mobile a:not(.nav-auth-btn):last-child { border-bottom: none; }
|
||||||
.nav-mobile a:hover { color: #1D4ED8; }
|
.nav-mobile a:not(.nav-auth-btn):hover { color: #1D4ED8; }
|
||||||
|
/* nav-auth-btn in mobile menu: override block style, keep button colours */
|
||||||
.nav-mobile a.nav-auth-btn,
|
.nav-mobile a.nav-auth-btn,
|
||||||
.nav-mobile button.nav-auth-btn {
|
.nav-mobile button.nav-auth-btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
|
padding: 6px 16px;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
.nav-mobile .nav-mobile-section {
|
.nav-mobile .nav-mobile-section {
|
||||||
font-size: 0.6875rem;
|
font-size: 0.6875rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user