fix(admin): render Leaflet maps in template preview
This commit is contained in:
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- **Admin template preview maps** — Leaflet maps rendered blank in admin preview due to `.card` `overflow: hidden` clipping tile layers. Set `overflow: visible` on the rendered-article card. Also added `.catch()` handlers to map fetch calls so failures are logged to console.
|
||||
- **Pipeline diagnostic script** (`scripts/check_pipeline.py`) — handle DuckDB catalog naming quirk where `lakehouse.duckdb` uses catalog `lakehouse` instead of `local`, causing SQLMesh logical views to break. Script now auto-detects the catalog via `USE`, and falls back to querying physical tables (`sqlmesh__<schema>.<table>__<hash>`) when views fail.
|
||||
- **Eurostat gas prices extractor** — `nrg_pc_203` filter missing `unit` dimension (API returns both KWH and GJ_GCV); now filters to `KWH`.
|
||||
- **Eurostat labour costs extractor** — `lc_lci_lev` used non-existent `currency` filter dimension; corrected to `unit: EUR`.
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Rendered article #}
|
||||
<div class="card">
|
||||
{# Rendered article — overflow:visible needed so Leaflet tile layers render #}
|
||||
<div class="card" style="overflow: visible;">
|
||||
<h2 class="text-lg mb-4">Rendered HTML</h2>
|
||||
<div class="article-body" style="max-width: none;">
|
||||
{{ preview.html | safe }}
|
||||
|
||||
@@ -58,7 +58,8 @@
|
||||
bounds.push([c.lat, c.lon]);
|
||||
});
|
||||
if (bounds.length) map.fitBounds(bounds, { padding: [24, 24] });
|
||||
});
|
||||
})
|
||||
.catch(function(err) { console.error('Country map fetch failed:', err); });
|
||||
}
|
||||
|
||||
var VENUE_ICON = L.divIcon({
|
||||
@@ -94,7 +95,8 @@
|
||||
.bindTooltip(tip, { className: 'map-tooltip', direction: 'top', offset: [0, -7] })
|
||||
.addTo(map);
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(function(err) { console.error('City map fetch failed:', err); });
|
||||
}
|
||||
|
||||
/* Dynamically load Leaflet JS then init maps */
|
||||
|
||||
Reference in New Issue
Block a user