feat: wire Nitro API to Go, real staffing plan and train proxy
- Replace mock Nitro routes with server-side proxies to the Go API - /plan reads Go /api/staffing; local assumption edits are a labeled preview - /simulate reads base and scenario staffing from Go instead of local multipliers - Route train upload and scenario POST through Nitro with server-only credentials - Keep NUXT_PUBLIC_USE_MOCK=1 as an explicit dev fallback only - Match Go's global-peak flat schedule and add a captured Go parity fixture - Run the web runtime as numeric UID/GID 10001:10001 - Add make check, Gitea CI workflow and a proxy smoke script
This commit is contained in:
1 parent
e8d141ca43
commit
b33e6ff001
33 files changed
+1147
-317
No files matched your search
+9
-2
@@ -8,6 +8,13 @@ import {
|
||||
} from '@sit-onyx/icons'
|
||||
|
||||
const route = useRoute()
|
||||
const config = useRuntimeConfig()
|
||||
const usingMock = computed(
|
||||
() =>
|
||||
config.public.useMock === true ||
|
||||
config.public.useMock === '1' ||
|
||||
config.public.useMock === 'true',
|
||||
)
|
||||
|
||||
const navigation = [
|
||||
{ to: '/', label: 'Now', icon: iconHome },
|
||||
@@ -34,7 +41,7 @@ const activeLabel = computed(
|
||||
:icon="item.icon"
|
||||
/>
|
||||
<template #contextArea>
|
||||
<OnyxBadge color="warning">Mock data</OnyxBadge>
|
||||
<OnyxBadge :color="usingMock ? 'warning' : 'success'">{{ usingMock ? 'Mock data' : 'Go API' }}</OnyxBadge>
|
||||
</template>
|
||||
<template #mobileActivePage>{{ activeLabel }}</template>
|
||||
</OnyxNavBar>
|
||||
@@ -46,7 +53,7 @@ const activeLabel = computed(
|
||||
<footer class="app-footer">
|
||||
<span><strong>PulseCast</strong> — staff the pulse, not the noise.</span>
|
||||
<span class="muted small">
|
||||
Prototype · mock forecast and weather · estimated devices, not people · 8 sensors in a 580 m cluster
|
||||
Prototype · forecast from the Go API · estimated devices, not people · 8 sensors in a 580 m cluster
|
||||
</span>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
Reference in new issue
Block a user