{% extends "base.html" %}
{% import "_macros.html" as m %}
{% import "_map.html" as nc_map %}
{% block title %}{{ array_name }} – array summary{% endblock %}
{% block page_styles %}
/* Table + caption styles are canonical in emit_css now. */
.meta-grid div { font-size:0.82rem; }
.btn { display:inline-block; padding:0.15em 0.55em; border-radius:4px; font-size:0.75rem;
font-weight:700; text-decoration:none; color:#fff; margin:0 0.15rem 0.2rem 0; }
.btn-sum { background:#2c3e50; }
.btn-stk { background:#2980b9; }
.btn-grd { background:#8e44ad; }
.btn-miss { background:#bbb; cursor:default; pointer-events:none; }
.fig { max-width:60%; display:block; margin:0.5rem auto 1rem; border:1px solid var(--rule); border-radius:4px; }
{% endblock %}
{% block head_extra %}{{ nc_map.map_styles(leaflet_css, map_height) }}{% endblock %}
{% block masthead_title %}{{ array_name }}{% endblock %}
{% block masthead_type %}Array{% endblock %}
{% block masthead_nav %}{% endblock %}
{% block masthead_meta %}
{% if year %}
Year {{ year }} {% endif %}
{% if cruise %}
Cruise {{ cruise }} {% endif %}
{% if ship %}
Ship {{ ship }} {% endif %}
{% if project %}
Project {{ project }} {% endif %}
Moorings {{ moorings | length }}
Position {{ masthead.position }}
Extent {{ masthead.extent }}
Deployed {{ masthead.deployed }}
Recovered {{ masthead.recovered }}
Duration {{ masthead.duration }}
Water depth {{ masthead.waterdepth }}
Instruments {{ masthead.instruments }}
Status {{ masthead.status }}
Processed to {{ masthead.processed }}
Source {{ masthead.source }}
Processed {{ generated }}
{% endblock %}
{% block content %}
Moorings Instrument summary Completeness
{% if payload_json != "[]" or fig_map_b64 %}
Mooring positions
{% if payload_json != "[]" %}
{# Either the Leaflet map or the PNG, never both: track_map shows the interactive map on
screen and swaps to the matplotlib PNG fallback when printing (Leaflet does not print). #}
{{ nc_map.track_map(payload_json, coastline_json, bounds_json, fig_map_b64, leaflet_js) }}
{% elif fig_map_b64 %}
{%- if show_source %}{% set _src = source_of(fig_map_b64) %}{% if _src %}source: {{ _src }}
{% endif %}{% endif %}
{% endif %}
{% endif %}
Moorings
#
Mooring
Latitude
Longitude
Depth (m)
Deployment
Recovery
Duration
Instruments
Reports
{% for r in moorings %}
{% if r.color_hex %} {% endif %}{{ r.position }}
{% if r.report_exists %}{{ r.mooring }} {% else %}{{ r.mooring }} {% endif %}
{{ "%.4f"|format(r.lat) if r.lat is not none else "—" }}
{{ "%.4f"|format(r.lon) if r.lon is not none else "—" }}
{{ r.waterdepth if r.waterdepth else "—" }}
{{ r.deploy_time }}
{{ r.recover_time }}
{{ r.duration }}
{{ r.n_instruments }}
{% if r.report_exists %}
Summary
{% else %}
Summary
{% endif %}
{% if r.stack_exists %}
Stack
{% endif %}
{% if r.grid_exists %}
Grid
{% endif %}
{% endfor %}
{% if type_summary %}
Instrument type summary
Type
Deployed
Complete (Stage 3 ✓)
Skipped / no raw
Stopped early
Notes
{% for row in type_summary %}
{{ row.itype }}
{{ row.deployed }}
{{ row.complete }}
{{ row.skipped }}
{{ row.stopped_early }}
{{ row.notes }}
{% endfor %}
{% endif %}
{% if mooring_completeness %}
Data completeness by mooring
Mooring
Depth (m)
Deployed
Complete
Skipped
Stopped early
Deployment (UTC)
Recovery (UTC)
Duration
{% for row in mooring_completeness %}
{{ row.mooring }}
{{ row.waterdepth if row.waterdepth else "—" }}
{{ row.deployed }}
{{ row.complete }}
{{ row.skipped }}
{{ row.stopped_early }}
{{ row.deploy_time }}
{{ row.recover_time }}
{{ row.duration }}
{% endfor %}
{% endif %}
{% endblock %}