PageSourceSearch

https://vltn.sh/assets/js/Dashboard-6Pn0BJXz.js

js vltn.sh collected 2026-10-07 15:54:17 UTC 18,737 bytes, 1 lines download raw bytes

1import{a as k}from"./rolldown-runtime-W-g5d7YK.js";import{Ct as C,E as j,H as N,I,Ot as A,Rt as u,St as f,V as v,X as S,_ as M,c as p,ct as L,dt as D,it as T,vt as d,z as _,zt as t}from"./vendor-Dx0nRn9D.js";import{i as E,r as q,t as n}from"./animation-ChgW8DUQ.js";import{t as B}from"./env-DzZqV545.js";import{h as H,v as P,x as R,y as g}from"./index-BwYiqp1C.js";var Z=k(E(),1),F=B.backendUrl,G=class{async makeAuthenticatedRequest(r,o={}){const i=await H(`${F}${r}`,o);if(g.log("Statut de la réponse:",i.status),!i.ok){const l=await i.json().catch(()=>({error:"Erreur réseau"}));throw console.error("Erreur de l'API:",l),i.status===401&&(l.error==="Token invalide"||l.error==="Token d'authentification requis")?(g.log("Token expiré ou invalide, redirection vers la page de login..."),window.location.href="/admin/login",new Error("Session expirée")):new Error(l.error||`Erreur HTTP ${i.status}`)}return i.json()}async getDatabaseInfo(){return this.makeAuthenticatedRequest("/database/info")}async getDatabaseHealth(){return this.makeAuthenticatedRequest("/database/health")}},b=new G,e=q(),O={frontend:f,mobile:I,backend:N,database:d,tools:v,design:D,hosting:C},Q=()=>{const{user:r,logout:o}=P(),{toast:i}=R(),{data:l,isFetching:x,isError:h,refetch:y}=M({queryKey:["admin","database-info"],queryFn:async()=>{const[a,m]=await Promise.all([b.getDatabaseInfo(),b.getDatabaseHealth()]);return{info:a,health:m}}}),s=l?.info??null,c=l?.health??null;(0,Z.useEffect)(()=>{h&&i({title:"Erreur",description:"Impossible de charger les informations de la base de données",variant:"destructive"})},[h,i]);const w=async()=>{try{await o()}catch(a){console.error("Erreur lors de la déconnexion:",a)}};return(0,e.jsxs)("div",{className:"min-h-screen bg-linear-to-br from-slate-50 via-white to-slate-100",children:[(0,e.jsx)("header",{className:"bg-white border-b border-slate-200 shadow-sm",children:(0,e.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,e.jsxs)("div",{className:"flex justify-between items-center h-16",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-linear-to-br from-accent to-accent-dark rounded-lg flex items-center justify-center",children:(0,e.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 375 375",className:"text-white",children:[(0,e.jsx)("path",{fill:"currentColor",d:"M 23.84375 351.09375 C 115.386719 351.09375 189.59375 276.886719 189.59375 185.347656 L 23.84375 185.347656 Z M 23.84375 351.09375"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 351.148438 23.898438 C 259.609375 23.898438 185.398438 98.105469 185.398438 189.648438 L 351.148438 189.648438 Z M 351.148438 23.898438"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 189.242188 190 C 97.703125 190 23.492188 115.792969 23.492188 24.25 L 189.242188 24.25 Z M 189.242188 190"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 185.75 184.992188 C 277.292969 184.992188 351.5 259.203125 351.5 350.742188 L 185.75 350.742188 Z M 185.75 184.992188"})]})}),(0,e.jsx)("h1",{className:"text-xl font-bold text-slate-900",children:"Administration VLTN"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[(0,e.jsx)(t,{icon:j,className:"w-4 h-4"}),(0,e.jsx)("span",{children:r?.preferred_username||"Utilisateur"})]}),(0,e.jsxs)("button",{onClick:w,className:"flex items-center gap-2 px-3 py-2 text-sm text-slate-600 hover:text-slate-900 hover:bg-slate-100 rounded-lg transition-colors",children:[(0,e.jsx)(t,{icon:S,className:"w-4 h-4"}),"Déconnexion"]})]})]})})}),(0,e.jsx)("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,e.jsxs)(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,e.jsxs)("div",{className:"mb-8",children:[(0,e.jsx)("h2",{className:"text-3xl font-bold text-slate-900 mb-2",children:"Bienvenue dans l'espace administration"}),(0,e.jsx)("p",{className:"text-slate-600",children:"Gérez vos projets et votre contenu depuis cette interface."})]}),(0,e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8",children:[(0,e.jsx)(p,{to:"/admin/projects",children:(0,e.jsxs)(n.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"bg-white rounded-xl border border-slate-200 p-6 hover:shadow-md transition-shadow cursor-pointer group",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center group-hover:bg-blue-200 transition-colors",children:(0,e.jsx)(t,{icon:L,className:"w-6 h-6 text-blue-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"font-semibold text-slate-900",children:"Gestion des projets"}),(0,e.jsx)("p",{className:"text-sm text-slate-600",children:"Créer, modifier et supprimer des projets"})]})]}),(0,e.jsx)("div",{className:"text-sm text-accent font-medium",children:"Accéder à la gestion →"})]})}),(0,e.jsx)(p,{to:"/admin/technologies",children:(0,e.jsxs)(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"bg-white rounded-xl border border-slate-200 p-6 hover:shadow-md transition-shadow cursor-pointer group",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-orange-100 rounded-lg flex items-center justify-center group-hover:bg-orange-200 transition-colors",children:(0,e.jsx)(t,{icon:v,className:"w-6 h-6 text-orange-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"font-semibold text-slate-900",children:"Gestion des technologies"}),(0,e.jsx)("p",{className:"text-sm text-slate-600",children:"Gérer votre stack technique et expertise"})]})]}),(0,e.jsx)("div",{className:"text-sm text-accent font-medium",children:"Accéder à la gestion →"})]})}),(0,e.jsxs)(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"bg-white rounded-xl border border-slate-200 p-6 hover:shadow-md transition-shadow cursor-pointer group",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,e.jsx)("div",{className:"w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center group-hover:bg-green-200 transition-colors",children:(0,e.jsx)(t,{icon:j,className:"w-6 h-6 text-green-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"font-semibold text-slate-900",children:"Configuration"}),(0,e.jsx)("p",{className:"text-sm text-slate-600",children:"Paramètres du site et préférences"})]})]}),(0,e.jsx)("div",{className:"text-sm text-slate-500",children:"Bientôt disponible"})]})]}),(0,e.jsxs)(n.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"bg-white rounded-xl border border-slate-200 p-6 mb-8",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,e.jsx)("h3",{className:"text-lg font-semibold text-slate-900",children:"Informations de session"}),(0,e.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 bg-linear-to-r from-accent/10 to-accent-dark/10 border border-accent/20 rounded-lg",children:[(0,e.jsx)("div",{className:"w-5 h-5 bg-linear-to-br from-accent to-accent-dark rounded flex items-center justify-center",children:(0,e.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 375 375",className:"text-white",children:[(0,e.jsx)("path",{fill:"currentColor",d:"M 23.84375 351.09375 C 115.386719 351.09375 189.59375 276.886719 189.59375 185.347656 L 23.84375 185.347656 Z M 23.84375 351.09375"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 351.148438 23.898438 C 259.609375 23.898438 185.398438 98.105469 185.398438 189.648438 L 351.148438 189.648438 Z M 351.148438 23.898438"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 189.242188 190 C 97.703125 190 23.492188 115.792969 23.492188 24.25 L 189.242188 24.25 Z M 189.242188 190"}),(0,e.jsx)("path",{fill:"currentColor",d:"M 185.75 184.992188 C 277.292969 184.992188 351.5 259.203125 351.5 350.742188 L 185.75 350.742188 Z M 185.75 184.992188"})]})}),(0,e.jsx)("span",{className:"text-sm font-medium text-slate-700",children:"Authentifié via VLTN Connect"}),(0,e.jsx)("div",{className:"flex items-center gap-1",children:(0,e.jsx)(t,{icon:A,className:"w-4 h-4 text-accent-dark"})})]})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Nom d'utilisateur"}),(0,e.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:r?.preferred_username||"Non défini"})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Email"}),(0,e.jsx)("p",{className:"text-sm font-medium text-slate-900 mt-1",children:r?.email||"Non défini"})]})]}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Groupes d'autorisation"}),(0,e.jsx)("div",{className:"mt-1 flex flex-wrap gap-1",children:r?.groups?.map(a=>(0,e.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-accent/10 text-accent border border-accent/20",children:a},a))||(0,e.jsx)("span",{className:"text-sm text-slate-500",children:"Aucun groupe"})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"ID utilisateur"}),(0,e.jsx)("p",{className:"text-xs font-mono text-slate-600 mt-1 break-all",children:r?.sub||"Non défini"})]})]})]}),(0,e.jsx)("div",{className:"pt-4 border-t border-slate-100",children:(0,e.jsx)("div",{className:"flex items-start gap-3 p-3 bg-slate-50 rounded-lg",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{className:"text-sm font-medium text-slate-900 mb-1",children:"Session sécurisée"}),(0,e.jsx)("p",{className:"text-xs text-slate-600 leading-relaxed",children:"Votre identité est authentifiée par le système de fédération d'identité VLTN Connect. Cette session bénéficie d'un chiffrement de bout en bout."})]})})})]})]}),(0,e.jsxs)(n.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5,delay:.5},className:"bg-white rounded-xl border border-slate-200 p-6",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,e.jsx)("h3",{className:"text-lg font-semibold text-slate-900",children:"Contrôle de la base de données"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[c&&(0,e.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg border ${c.status==="healthy"?"bg-green-50 border-green-200 text-green-700":"bg-red-50 border-red-200 text-red-700"}`,children:[(0,e.jsx)(t,{icon:u,className:`w-4 h-4 ${c.status==="healthy"?"text-green-600":"text-red-600"}`}),(0,e.jsx)("span",{className:"text-sm font-medium",children:c.status==="healthy"?"Opérationnelle":"Problème"}),(0,e.jsxs)("span",{className:"text-xs",children:["(",c.responseTime,")"]})]}),(0,e.jsxs)("button",{onClick:()=>y(),disabled:x,className:"flex items-center gap-2 px-3 py-2 text-sm bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg transition-colors disabled:opacity-50",children:[(0,e.jsx)(t,{icon:d,className:"w-4 h-4"}),x?"Actualisation...":"Actualiser"]})]})]}),x?(0,e.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,e.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent"}),(0,e.jsx)("span",{className:"ml-3 text-slate-600",children:"Chargement des informations..."})]}):s?(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,e.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center",children:(0,e.jsx)(t,{icon:N,className:"w-4 h-4 text-blue-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Fournisseur"}),(0,e.jsx)("p",{className:"text-sm font-semibold text-slate-900",children:s.provider})]})]}),(0,e.jsx)("p",{className:"text-xs text-slate-600",children:s.region})]}),(0,e.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:(0,e.jsx)(t,{icon:d,className:"w-4 h-4 text-green-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Base de données"}),(0,e.jsx)("p",{className:"text-sm font-semibold text-slate-900",children:s.database.name})]})]}),(0,e.jsx)("p",{className:"text-xs text-slate-600",children:s.database.version})]}),(0,e.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center",children:(0,e.jsx)(t,{icon:T,className:"w-4 h-4 text-purple-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Taille"}),(0,e.jsx)("p",{className:"text-sm font-semibold text-slate-900",children:s.database.size})]})]}),(0,e.jsxs)("p",{className:"text-xs text-slate-600",children:[s.database.tables," tables"]})]}),(0,e.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,e.jsx)("div",{className:"w-8 h-8 bg-orange-100 rounded-lg flex items-center justify-center",children:(0,e.jsx)(t,{icon:u,className:"w-4 h-4 text-orange-600"})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide",children:"Connexions"}),(0,e.jsxs)("p",{className:"text-sm font-semibold text-slate-900",children:[s.connections.active,"/",s.connections.max]})]})]}),(0,e.jsx)("p",{className:"text-xs text-slate-600",children:"Actives/Maximum"})]})]}),(0,e.jsxs)("div",{className:"border-t border-slate-100 pt-6",children:[(0,e.jsx)("h4",{className:"text-sm font-semibold text-slate-900 mb-4",children:"Statistiques des projets"}),(0,e.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-5 ga
1p-4",children:[(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-slate-900",children:s.projects.total}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Total"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-green-600",children:s.projects.active}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Actifs"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-yellow-600",children:s.projects.draft}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Brouillons"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-gray-600",children:s.projects.archived}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Archivés"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-accent",children:s.projects.featured}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Mis en avant"})]})]})]}),(0,e.jsxs)("div",{className:"border-t border-slate-100 pt-6",children:[(0,e.jsx)("h4",{className:"text-sm font-semibold text-slate-900 mb-4",children:"Statistiques des technologies"}),(0,e.jsxs)("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-slate-900",children:s.technologies.total}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Total"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-green-600",children:s.technologies.active}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Actives"})]}),(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"text-2xl font-bold text-gray-600",children:s.technologies.inactive}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:"Inactives"})]})]}),(0,e.jsxs)("div",{className:"bg-slate-50 rounded-lg p-4",children:[(0,e.jsx)("h5",{className:"text-xs font-medium text-slate-500 uppercase tracking-wide mb-3",children:"Répartition par catégorie"}),(0,e.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:Object.entries(s.technologies.by_category).map(([a,m])=>(0,e.jsxs)("div",{className:"text-center",children:[(0,e.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,e.jsx)("div",{className:"w-8 h-8 bg-white rounded-lg flex items-center justify-center border border-slate-200",children:(0,e.jsx)(t,{icon:O[a]??f,className:"w-4 h-4 text-slate-600"})})}),(0,e.jsx)("div",{className:"text-lg font-bold text-slate-900",children:m}),(0,e.jsx)("div",{className:"text-xs text-slate-500",children:{frontend:"Frontend",mobile:"Mobile",backend:"Backend",database:"Base de données",tools:"Outils",design:"Design",hosting:"Hébergement"}[a]})]},a))})]})]}),(0,e.jsx)("div",{className:"border-t border-slate-100 pt-6",children:(0,e.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-slate-50 rounded-lg",children:[(0,e.jsx)(t,{icon:_,className:"w-5 h-5 text-slate-600 mt-0.5"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{className:"text-sm font-medium text-slate-900 mb-1",children:"Sécurité et conformité"}),(0,e.jsxs)("p",{className:"text-xs text-slate-600 leading-relaxed",children:["Connexion SSL/TLS chiffrée • Hébergement conforme RGPD • Sauvegardes automatiques • Surveillance 24/7 • Dernière mise à jour : ",new Date(s.timestamp).toLocaleString("fr-FR")]})]})]})})]}):(0,e.jsxs)("div",{className:"text-center py-8",children:[(0,e.jsx)(t,{icon:d,className:"w-12 h-12 text-slate-400 mx-auto mb-3"}),(0,e.jsx)("p",{className:"text-slate-600",children:"Impossible de charger les informations de la base de données"})]})]})]})})]})};export{Q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.