diff --git a/backend/main.py b/backend/main.py index 6c99b7d..3009107 100644 --- a/backend/main.py +++ b/backend/main.py @@ -258,6 +258,14 @@ async def project_tidy_page(request: Request): return templates.TemplateResponse("admin/project_tidy.html", {"request": request}) +@app.get("/tools", response_class=HTMLResponse) +async def tools_page(request: Request): + """Tools / workflow hub. Active operator workflows (device pairing, + project tidy, metadata backfill, future swap detection, report + generators) all live here in card form.""" + return templates.TemplateResponse("tools.html", {"request": request}) + + @app.get("/modems", response_class=HTMLResponse) async def modems_page(request: Request): """Field modems management dashboard""" diff --git a/templates/base.html b/templates/base.html index c869e0f..cfdf4e0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -109,22 +109,22 @@ Dashboard - {# Fleet — single sidebar entry for all device-type pages. - The tab strip on each underlying page (Seismographs / - Sound Level Meters / Modems / All Devices) handles - navigation between the device-type-specific layouts. + {# Devices — single sidebar entry covering all device-type + pages. Lands on /roster (the unified all-devices view); + the tab strip on each underlying page lets the operator + drill into seismograph / SLM / modem specifics. Active when on any /seismographs, /sound-level-meters, /modems, /roster, /pair-devices, /unit/* page. #} - {% set _is_fleet = ( + {% set _is_devices = ( request.url.path in ('/seismographs', '/sound-level-meters', '/modems', '/roster', '/pair-devices') or request.url.path.startswith('/unit/') or request.url.path.startswith('/slm/') ) %} - + - + - Fleet + Devices @@ -134,6 +134,23 @@ Projects + {# Tools — operator workflow hub. Active when on /tools + itself or any of the workflow pages it links into + (project tidy, metadata backfill, pair devices). #} + {% set _is_tools = ( + request.url.path == '/tools' + or request.url.path == '/pair-devices' + or request.url.path == '/settings/developer/project-tidy' + or request.url.path == '/settings/developer/metadata-backfill' + ) %} + + + + + + Tools + + diff --git a/templates/partials/fleet_tab_strip.html b/templates/partials/fleet_tab_strip.html index 5fb879a..21ab219 100644 --- a/templates/partials/fleet_tab_strip.html +++ b/templates/partials/fleet_tab_strip.html @@ -14,6 +14,13 @@ Usage at top of any Fleet-section template:
diff --git a/templates/settings.html b/templates/settings.html index 445455f..bd264e1 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -575,33 +575,9 @@
- -
-
-
Backfill from event metadata
-
- Auto-create projects, locations, and unit assignments from the operator-typed metadata baked into SFM events. Skip the manual entry. -
-
- - Open - -
- - -
-
-
Project Tidy
-
- Find duplicate-looking projects via fuzzy name match (typos, abbreviations, spacing variations) and bulk-merge them. -
-
- - Open - -
+ {# Metadata Backfill + Project Tidy moved to Tools (they're + operator workflows, not admin/dev surfaces). Find them + at /tools. #}
diff --git a/templates/tools.html b/templates/tools.html new file mode 100644 index 0000000..4b20006 --- /dev/null +++ b/templates/tools.html @@ -0,0 +1,110 @@ +{% extends "base.html" %} + +{% block title %}Tools - Seismo Fleet Manager{% endblock %} + +{% block content %} + +
+

Tools

+

+ Active operator workflows. Pair devices, clean up duplicates, generate reports. +

+
+ + +
+ + + +
+
+ + + +
+
+

Pair Devices

+

+ Bidirectionally link seismographs ↔ modems (or SLMs ↔ modems) so they ship out together as a deployed pair. +

+
+
+
+ + + +
+
+ + + +
+
+

Project Tidy

+

+ Find duplicate-looking projects via fuzzy name match (typos, abbreviations) and bulk-merge them. Useful after a metadata backfill run. +

+
+
+
+ + + +
+
+ + + +
+
+

Backfill from event metadata

+

+ Auto-create projects, locations, and unit assignments from the operator-typed metadata baked into SFM events. Skip the manual entry. +

+
+
+
+ + + +
+
+ + + +
+
+

Reports

+

+ Excel report generation lives on each project's detail page. Open a project and use Generate Combined Report (for multi-location sound studies) or single-location export. +

+
+
+
+ + +
+
+
+ + + +
+
+
+

Swap Detection

+ soon +
+

+ Daily background job that auto-detects unit swaps in the field (BE12345 → BE67890 at the same project + location) from operator-typed metadata. Coming in Phase 5c. +

+
+
+
+ +
+{% endblock %}