L'admin etait une 2e app front Vite independante (apps/admin-web, port 5174,
Dockerfile nginx, service compose dedie, job CI propre) non demandee. Toute
l'UI passe dans apps/web sous le prefixe /admin ; seul le frontend est
fusionne, l'authentification admin reste entierement separee.
Front (apps/web/src) :
- pages -> pages/admin/{login,dashboard,monitoring,corrections,catalog}/,
layout -> layouts/AdminLayout.tsx, contexte + garde -> features/admin/.
- client API -> api/admin-client.ts : classe AdminApiError (evite la
collision avec ApiError), lit VITE_API_URL (plus de VITE_ADMIN_API_URL).
- routes /admin/* dans App.tsx, enveloppees d'AdminAuthProvider +
RequireAdmin -> le probe GET /admin/auth/me ne tourne que sous /admin.
- reutilise l'i18n, lib/zod-errors, services/error-message.service et le
theme SCSS de apps/web ; bloc i18n admin.* fusionne dans la locale fr
(les cles errors etaient deja toutes presentes).
- corrige une race dans CatalogPage (reponse d'un onglet precedent qui
ecrasait l'onglet courant, exposee par le double-mount StrictMode) via
un ref requestSeq.
Auth admin inchangee : table AdminUser, cookie admin_session,
ADMIN_JWT_SECRET, script create-admin.ts.
Infra :
- docker-compose : service admin-web + ADMIN_WEB_PORT supprimes (l'app
`app` sert deja le front construit).
- ADMIN_CORS_ORIGIN retire (meme origine) : env.ts, app.ts, .env.example.
- job CI "Run admin-web E2E tests" supprime ; les specs admin-* tournent
dans le job web (apps/web/cypress/e2e/admin-*.{cy.ts,feature}).
- apps/api/.env.example : ajout ADMIN_JWT_SECRET / ADMIN_INITIAL_*.
- recharts ajoute a apps/web ; pnpm-lock regenere.
- specs/backend-architecture.md : section admin mise a jour.
Verifie : biome + tsc -b (web/api) + pnpm -r build verts ; Cypress web
102/103 (l'unique echec est le flake pre-existant recipe-form.feature
"Preloads ..." de clipping headless, sans rapport) ; 16/16 specs admin ;
45/45 composants.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
98 lines
2 KiB
SCSS
98 lines
2 KiB
SCSS
// =============================================================================
|
|
// MonitoringPage — a grid of service health cards, one per probed target.
|
|
// Status drives a coloured left border + dot.
|
|
// =============================================================================
|
|
|
|
.monitoring-checked {
|
|
margin: 0 0 var(--space-md);
|
|
font-size: var(--font-size-sm);
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.monitoring-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.monitoring-card {
|
|
padding: var(--space-md);
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border);
|
|
border-left: 4px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
|
|
--status-color: var(--color-text-muted);
|
|
&--up {
|
|
--status-color: var(--color-success);
|
|
}
|
|
&--degraded {
|
|
--status-color: var(--color-warning);
|
|
}
|
|
&--down {
|
|
--status-color: var(--color-error);
|
|
}
|
|
&--unknown {
|
|
--status-color: var(--color-text-muted);
|
|
}
|
|
|
|
border-left-color: var(--status-color);
|
|
|
|
&__head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-sm);
|
|
|
|
h2 {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: var(--font-size-md);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
&__dot {
|
|
flex-shrink: 0;
|
|
width: 0.6rem;
|
|
height: 0.6rem;
|
|
border-radius: 50%;
|
|
background: var(--status-color);
|
|
}
|
|
|
|
&__status {
|
|
flex-shrink: 0;
|
|
font-size: var(--font-size-xs);
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--status-color);
|
|
}
|
|
|
|
&__meta {
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
|
|
div {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
dt {
|
|
flex-shrink: 0;
|
|
color: var(--color-text-muted);
|
|
min-width: 5rem;
|
|
}
|
|
|
|
dd {
|
|
margin: 0;
|
|
color: var(--color-text);
|
|
word-break: break-word;
|
|
}
|
|
}
|
|
}
|