-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
When provisioning a new avalanche center, we should automatically check the AFP (Avalanche Forecast Program) data to determine if the center is a single-zone or multi-zone operation and provision accordingly.
Currently, provisioning creates the same 7 built-in pages regardless of zone count. Zone-aware navigation is handled dynamically at runtime (src/components/Header/utils.ts), but the built-in pages created during provisioning should also differ.
Areas to update
src/collections/Tenants/endpoints/provisionTenant.ts— Query AFP viagetActiveForecastZones()fromsrc/services/nac/nac.tsto determine zone count, then create the appropriate built-in pages:- Single zone: Create
/forecasts/avalanche/{zone}page - Multi-zone: Create
/forecasts/avalanche(all forecasts) + one page per zone at/forecasts/avalanche/{zone}
- Single zone: Create
docs/onboarding.md— Already documents the single vs multi-zone difference (lines 22-34), update if provisioning handles this automatically- Filter built-in pages using DVAC navigation —
extractNavReferences(inprovisionTenant.ts) already extractsbuiltInPageUrlsfrom the template navigation. Use this to filterBUILT_IN_PAGESso only navigation-referenced built-in pages are created, matching how pages are already filtered. See TODO comments inprovisionTenant.tsandonboardingActions.tsreferencing Make automated topLevelNavItems use built-in pages & nav improvements #1002.
Context
From the onboarding provisioning PR — zone configuration was identified as something that could be automated rather than manually configured. The NAC API already provides zone data via getActiveForecastZones(centerSlug).
Acceptance Criteria
- Query AFP data during provisioning to determine zone count
- Create zone-specific built-in pages based on single vs multi-zone
- Filter built-in pages to those referenced in DVAC's navigation (use
navBuiltInPageUrlsfromextractNavReferences) - Handle cases where AFP data is unavailable (fall back to manual configuration)
- Update onboarding docs to reflect automation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels