feat(topology): add GHC06 layout and deploy docs
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,33 @@ from topology_api.queries.snapshot_queries import (
|
||||
)
|
||||
|
||||
snapshot_bp = Blueprint("snapshot", __name__)
|
||||
GHC06_LAYOUT_START = datetime.fromisoformat("2025-02-15T00:00:00+00:00")
|
||||
|
||||
|
||||
def _layout_key_for_snapshot(requested_mission, snapshot_at):
|
||||
"""Keep historical mission views pinned to their contemporary layout.
|
||||
|
||||
GHC-05 overlaps GHC-06 chronologically, so timestamp-only selection would
|
||||
incorrectly redraw the GHC-05 terminal snapshot with the later expansion
|
||||
layout. Explicit mission views therefore take precedence over time.
|
||||
"""
|
||||
if requested_mission:
|
||||
try:
|
||||
mission_number = int(requested_mission.rsplit("-", 1)[-1])
|
||||
except (TypeError, ValueError):
|
||||
mission_number = None
|
||||
return (
|
||||
"engineering_overview_ghc06_v1"
|
||||
if mission_number is not None and mission_number >= 6
|
||||
else None
|
||||
)
|
||||
|
||||
snapshot_dt = datetime.fromisoformat(snapshot_at.replace("Z", "+00:00"))
|
||||
return (
|
||||
"engineering_overview_ghc06_v1"
|
||||
if snapshot_dt >= GHC06_LAYOUT_START
|
||||
else None
|
||||
)
|
||||
|
||||
|
||||
def _parse_iso_timestamp(value):
|
||||
@@ -82,7 +109,8 @@ def get_snapshot(base_code):
|
||||
})
|
||||
|
||||
data = fetch_snapshot(snapshot_at)
|
||||
layout = fetch_layout()
|
||||
layout_key = _layout_key_for_snapshot(requested_mission, snapshot_at)
|
||||
layout = fetch_layout(layout_key=layout_key)
|
||||
|
||||
return jsonify({
|
||||
"base": data["base"],
|
||||
|
||||
Reference in New Issue
Block a user