33800 Docs

← Retour

Refonte page GitLab — Vue par projet

Date : 17/02/2026 Status : EN ATTENTE Scope : Backend (monitoring) + Frontend (dashboard-33800-frontend)

Objectif

Remplacer les 2 sections "Pipelines" et "Recent Deploys" par une seule liste de TOUS les projets GitLab, triée par déploiement le plus récent, avec lien vers GitLab.

La section "Builds en cours" (running pipelines avec progress bars) reste inchangée en haut.

Changements

Backend — collectors/gitlab.ts

Nouveau collecteur collectProjects() :

Backend — routes/gitlab.ts

Nouvel endpoint : GET /api/gitlab/projects (cache 60s)

Frontend — lib/types.ts

Nouveau type GitlabProject :

export interface GitlabProject {
  name: string;           // path_with_namespace (ex: gouroubleu/connectors-api)
  webUrl: string;         // URL projet GitLab
  lastPipeline: {
    id: number;
    ref: string;
    status: string;
    createdAt: string;
    duration: number | null;
    webUrl: string;        // Lien direct vers la pipeline
  } | null;
  lastDeploy: {
    environment: string;
    status: string;
    createdAt: string;
  } | null;
}

Frontend — lib/api.ts

Nouveau : gitlabProjects: () => fetchApi('/api/gitlab/projects')

Frontend — routes/gitlab/index.tsx

Ce qui ne change PAS

Nombre d'appels API GitLab

Actuel : ~65 appels (20 projets × 3 pipelines + 15 projets × 2 deploys) Nouveau : ~60 appels (30 projets × 1 pipeline + 30 projets × 1 deploy) → Comparable, avec cache 60s

Fichiers modifiés

  1. monitoring/backend/src/collectors/gitlab.ts — ajout collectProjects()
  2. monitoring/backend/src/routes/gitlab.ts — ajout route /projects
  3. dashboard-33800-frontend/src/lib/types.ts — ajout GitlabProject
  4. dashboard-33800-frontend/src/lib/api.ts — ajout gitlabProjects()
  5. dashboard-33800-frontend/src/routes/gitlab/index.tsx — refonte affichage