Compare commits
14 Commits
993524aa72
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d63b02fc4e | ||
| 7ed9382e73 | |||
| 539cbdd2f1 | |||
|
|
0d985b62b1 | ||
| 4d76d2697b | |||
| 0863dfad2e | |||
| 440fffc605 | |||
| fb96cc3c32 | |||
| aace834dd4 | |||
| f5cc79f510 | |||
| aad7a0a928 | |||
| db738715c3 | |||
| 850375ea93 | |||
| 8b5d4e9655 |
24
.github/workflows/release.yml
vendored
Normal file
24
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22.x
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- run: npm ci
|
||||||
|
|
||||||
|
- run: npx semantic-release
|
||||||
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Nuxt dev/build outputs
|
||||||
|
.output
|
||||||
|
.data
|
||||||
|
.nuxt
|
||||||
|
.nitro
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Node dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.fleet
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# Local env files
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
19
.releaserc.json
Normal file
19
.releaserc.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"branches": [
|
||||||
|
"develop"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"CHANGELOG.md"
|
||||||
|
],
|
||||||
|
"message": "chore(release): ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
159
AGENTS.md
Normal file
159
AGENTS.md
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# AGENTS.md
|
||||||
|
|
||||||
|
## Objectif
|
||||||
|
|
||||||
|
Ce fichier définit les règles que tout agent de code doit respecter dans ce dépôt.
|
||||||
|
|
||||||
|
Les objectifs sont :
|
||||||
|
- maintenir un code clair et cohérent
|
||||||
|
- éviter la complexité inutile
|
||||||
|
- empêcher la génération de code mort
|
||||||
|
- garantir des modifications prévisibles
|
||||||
|
|
||||||
|
Ce fichier est la source de vérité concernant le comportement de l’agent.
|
||||||
|
|
||||||
|
|
||||||
|
## Principes généraux
|
||||||
|
|
||||||
|
Toujours produire un code clair, simple et minimal.
|
||||||
|
|
||||||
|
Privilégier les implémentations explicites plutôt que les abstractions.
|
||||||
|
|
||||||
|
Ne jamais introduire de nouveaux patterns si un pattern existant résout déjà le problème.
|
||||||
|
|
||||||
|
Ne jamais générer :
|
||||||
|
- du code mort
|
||||||
|
- du code inutilisé
|
||||||
|
- du code spéculatif
|
||||||
|
- des fonctionnalités non demandées
|
||||||
|
|
||||||
|
|
||||||
|
## Lecture obligatoire avant modification
|
||||||
|
|
||||||
|
Avant toute modification de code, l’agent doit :
|
||||||
|
|
||||||
|
Lire entièrement le fichier à modifier.
|
||||||
|
|
||||||
|
Comprendre la structure et les conventions existantes.
|
||||||
|
|
||||||
|
Respecter :
|
||||||
|
- les conventions de nommage
|
||||||
|
- le style du fichier
|
||||||
|
- l’architecture déjà utilisée
|
||||||
|
|
||||||
|
Vérifier les fichiers liés pouvant être impactés.
|
||||||
|
|
||||||
|
Ne jamais proposer une modification sur du code qui n’a pas été lu.
|
||||||
|
|
||||||
|
|
||||||
|
## Règles de modification
|
||||||
|
|
||||||
|
Lors de l’édition de code :
|
||||||
|
|
||||||
|
Respecter l’architecture existante.
|
||||||
|
|
||||||
|
Réutiliser les utilitaires et fonctions déjà présents lorsque c’est possible.
|
||||||
|
|
||||||
|
Ne pas ajouter de dépendances sauf nécessité réelle.
|
||||||
|
|
||||||
|
Ne pas refactoriser du code non lié à la demande.
|
||||||
|
|
||||||
|
Faire des modifications minimales et ciblées.
|
||||||
|
|
||||||
|
Toujours préférer modifier du code existant plutôt que créer une logique parallèle.
|
||||||
|
|
||||||
|
|
||||||
|
## Qualité du code
|
||||||
|
|
||||||
|
Le code généré doit garantir :
|
||||||
|
|
||||||
|
Aucun code mort.
|
||||||
|
|
||||||
|
Aucune variable inutilisée.
|
||||||
|
|
||||||
|
Aucune branche inaccessible.
|
||||||
|
|
||||||
|
Aucune duplication inutile.
|
||||||
|
|
||||||
|
Aucune abstraction prématurée.
|
||||||
|
|
||||||
|
Si une logique n’est pas utilisée immédiatement, elle ne doit pas être écrite.
|
||||||
|
|
||||||
|
|
||||||
|
## Cohérence architecturale
|
||||||
|
|
||||||
|
Toujours suivre les conventions du dépôt.
|
||||||
|
|
||||||
|
Respecter notamment :
|
||||||
|
|
||||||
|
les conventions de nommage
|
||||||
|
l’organisation des fichiers
|
||||||
|
les patterns architecturaux existants
|
||||||
|
les composants ou modules déjà présents
|
||||||
|
|
||||||
|
|
||||||
|
## Sécurité Git
|
||||||
|
|
||||||
|
L’agent ne doit jamais :
|
||||||
|
|
||||||
|
créer un commit sans demande explicite
|
||||||
|
|
||||||
|
push des modifications
|
||||||
|
|
||||||
|
force push
|
||||||
|
|
||||||
|
modifier la configuration git
|
||||||
|
|
||||||
|
réécrire l’historique
|
||||||
|
|
||||||
|
|
||||||
|
## Sécurité
|
||||||
|
|
||||||
|
Ne jamais introduire dans le code :
|
||||||
|
|
||||||
|
des secrets
|
||||||
|
|
||||||
|
des identifiants
|
||||||
|
|
||||||
|
des tokens
|
||||||
|
|
||||||
|
des variables d’environnement sensibles
|
||||||
|
|
||||||
|
|
||||||
|
## Prise de décision
|
||||||
|
|
||||||
|
Si plusieurs implémentations sont possibles :
|
||||||
|
|
||||||
|
choisir la solution la plus simple
|
||||||
|
|
||||||
|
choisir la solution la plus cohérente avec le code existant
|
||||||
|
|
||||||
|
éviter d’introduire un nouveau pattern architectural
|
||||||
|
|
||||||
|
|
||||||
|
## Actions interdites
|
||||||
|
|
||||||
|
L’agent ne doit jamais :
|
||||||
|
|
||||||
|
ajouter des fonctionnalités non demandées
|
||||||
|
|
||||||
|
introduire du code mort
|
||||||
|
|
||||||
|
introduire des abstractions prématurées
|
||||||
|
|
||||||
|
modifier des fichiers non liés
|
||||||
|
|
||||||
|
réécrire de larges parties du projet sans instruction explicite
|
||||||
|
|
||||||
|
|
||||||
|
## Résultat attendu
|
||||||
|
|
||||||
|
Le code généré doit être :
|
||||||
|
|
||||||
|
lisible
|
||||||
|
|
||||||
|
minimal
|
||||||
|
|
||||||
|
cohérent avec le dépôt
|
||||||
|
|
||||||
|
immédiatement utilisable
|
||||||
13
CHANGELOG.md
Normal file
13
CHANGELOG.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# [1.2.0](https://gitea.malio.fr/MALIO-DEV/Supervisor/compare/v1.1.0...v1.2.0) (2026-03-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* show git tag version ([539cbdd](https://gitea.malio.fr/MALIO-DEV/Supervisor/commit/539cbdd2f1fa73eddab8adb6e2cc0683e6c424aa))
|
||||||
|
|
||||||
|
# [1.1.0](https://gitea.malio.fr/MALIO-DEV/Supervisor/compare/v1.0.0...v1.1.0) (2026-03-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **backup:** add backup scripts workflow ([0863dfa](https://gitea.malio.fr/MALIO-DEV/Supervisor/commit/0863dfad2e3c6272a012c30820381a2610e22d1b))
|
||||||
128
README.md
128
README.md
@@ -1,75 +1,93 @@
|
|||||||
# Nuxt Minimal Starter
|
# Projet Monitoring
|
||||||
|
|
||||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
## Installation du projet
|
||||||
|
|
||||||
## Setup
|
### Windows
|
||||||
|
Sur Windows, installer WSL2, Ubuntu, Docker et nvm.
|
||||||
|
Suivre la documentation suivante :
|
||||||
|
https://wiki.malio.fr/bookstack/books/environnement-de-dev/chapter/windows
|
||||||
|
|
||||||
Make sure to install dependencies:
|
### Linux
|
||||||
|
Sur Linux, installer Docker et nvm.
|
||||||
|
Suivre la documentation suivante :
|
||||||
|
https://wiki.malio.fr/bookstack/books/environnement-de-dev/chapter/linux
|
||||||
|
|
||||||
|
### Installation du projet
|
||||||
|
Une fois les prérequis installés, cloner le dépôt puis installer les dépendances.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# npm
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development Server
|
Lancer ensuite le serveur de développement.
|
||||||
|
|
||||||
Start the development server on `http://localhost:3000`:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# npm
|
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm dev
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn dev
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun run dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Production
|
L’application sera accessible sur :
|
||||||
|
http://localhost:3000
|
||||||
|
|
||||||
Build the application for production:
|
Si une erreur liée à la version de Node apparaît, vérifier que Node ≥ 20 est utilisé via nvm.
|
||||||
|
|
||||||
```bash
|
nvm install 20
|
||||||
# npm
|
nvm use 20
|
||||||
|
|
||||||
|
## Utilisation du projet
|
||||||
|
### Frontend
|
||||||
|
|
||||||
|
Lancer le serveur de développement.
|
||||||
|
```
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
Compilation pour la production.
|
||||||
|
```
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm build
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun run build
|
|
||||||
```
|
```
|
||||||
|
Prévisualisation du build de production.
|
||||||
Locally preview production build:
|
```
|
||||||
|
|
||||||
```bash
|
|
||||||
# npm
|
|
||||||
npm run preview
|
npm run preview
|
||||||
|
|
||||||
# pnpm
|
|
||||||
pnpm preview
|
|
||||||
|
|
||||||
# yarn
|
|
||||||
yarn preview
|
|
||||||
|
|
||||||
# bun
|
|
||||||
bun run preview
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
## Commandes utiles
|
||||||
|
|
||||||
|
Installation des dépendances.
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
Lancer le serveur de développement.
|
||||||
|
```
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
Build de production.
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
Prévisualisation du build.
|
||||||
|
```
|
||||||
|
npm run preview
|
||||||
|
```
|
||||||
|
Supprimer les dépendances et réinstaller proprement.
|
||||||
|
```
|
||||||
|
rm -rf node_modules package-lock.json
|
||||||
|
npm install
|
||||||
|
Déploiement
|
||||||
|
```
|
||||||
|
Construire l’application.
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
Les fichiers générés se trouvent dans :
|
||||||
|
.output/
|
||||||
|
|
||||||
|
Le serveur peut ensuite être lancé avec :
|
||||||
|
```
|
||||||
|
node .output/server/index.mjs
|
||||||
|
```
|
||||||
|
Il est recommandé d’utiliser un reverse proxy comme Nginx en production.
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
Les accès SSH ou les chemins système utilisés par les endpoints doivent rester côté serveur.
|
||||||
|
Ne jamais exposer de credentials dans le frontend.
|
||||||
|
Les variables sensibles doivent être stockées dans un fichier .env.
|
||||||
5
app.vue
Normal file
5
app.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<NuxtLayout>
|
||||||
|
<NuxtPage />
|
||||||
|
</NuxtLayout>
|
||||||
|
</template>
|
||||||
BIN
assets/LOGO_CARRE_BLANC.png
Normal file
BIN
assets/LOGO_CARRE_BLANC.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
159
assets/css/main.css
Normal file
159
assets/css/main.css
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
|
@import "./malio.css";
|
||||||
|
|
||||||
|
@theme {
|
||||||
|
--color-panel: #0f172a;
|
||||||
|
--color-panel-soft: #1e293b;
|
||||||
|
--color-m-primary: rgb(var(--m-primary));
|
||||||
|
--color-m-secondary: rgb(var(--m-secondary));
|
||||||
|
--color-m-tertiary: rgb(var(--m-tertiary));
|
||||||
|
--color-m-border: rgb(var(--m-border));
|
||||||
|
--color-m-text: rgb(var(--m-text));
|
||||||
|
--color-m-muted: rgb(var(--m-muted));
|
||||||
|
--color-m-bg: rgb(var(--m-bg));
|
||||||
|
--color-m-error: rgb(var(--m-error));
|
||||||
|
--color-m-success: rgb(var(--m-success));
|
||||||
|
--color-m-accent: rgb(var(--m-accent));
|
||||||
|
--color-m-warning: rgb(var(--m-warning));
|
||||||
|
--color-m-succes: rgb(var(--m-success));
|
||||||
|
--font-display: "Outfit", system-ui, sans-serif;
|
||||||
|
--font-mono: "JetBrains Mono", "Fira Code", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
|
||||||
|
|
||||||
|
@layer base {
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
background: rgb(var(--m-bg));
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
transition: background-color 0.4s ease, color 0.4s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@layer utilities {
|
||||||
|
.bg-grid {
|
||||||
|
background-image:
|
||||||
|
linear-gradient(to right, rgb(var(--m-accent) / 0.04) 1px, transparent 1px),
|
||||||
|
linear-gradient(to bottom, rgb(var(--m-accent) / 0.04) 1px, transparent 1px);
|
||||||
|
background-size: 32px 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-noise {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-noise::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
opacity: 0.025;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-glow {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px rgb(var(--m-accent) / var(--m-card-border-opacity)),
|
||||||
|
0 4px 24px -4px rgba(0, 0, 0, var(--m-shadow-opacity)),
|
||||||
|
0 0 48px -12px rgb(var(--m-accent) / 0.06);
|
||||||
|
transition: box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-glow-success {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px rgb(var(--m-success) / 0.15),
|
||||||
|
0 4px 24px -4px rgba(0, 0, 0, var(--m-shadow-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-glow-error {
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px rgb(var(--m-error) / 0.15),
|
||||||
|
0 4px 24px -4px rgba(0, 0, 0, var(--m-shadow-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-gradient {
|
||||||
|
background: linear-gradient(135deg, rgb(var(--m-accent)), rgb(var(--m-success)));
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in-up {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-glow {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes shimmer {
|
||||||
|
0% {
|
||||||
|
background-position: -200% 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
background-position: 200% 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-fade-in-up {
|
||||||
|
animation: fade-in-up 0.5s ease-out both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-pulse-glow {
|
||||||
|
animation: pulse-glow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-shimmer {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
var(--m-shimmer-from) 0%,
|
||||||
|
var(--m-shimmer-to) 50%,
|
||||||
|
var(--m-shimmer-from) 100%
|
||||||
|
);
|
||||||
|
background-size: 200% 100%;
|
||||||
|
animation: shimmer 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: rgb(var(--m-bg));
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgb(var(--m-border));
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgb(var(--m-muted));
|
||||||
|
}
|
||||||
28
assets/css/malio.css
Normal file
28
assets/css/malio.css
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@layer base {
|
||||||
|
:root {
|
||||||
|
--m-primary: 15 20 40;
|
||||||
|
--m-secondary: 22 30 55;
|
||||||
|
--m-tertiary: 30 41 72;
|
||||||
|
--m-border: 55 70 110;
|
||||||
|
--m-text: 220 225 240;
|
||||||
|
--m-muted: 130 145 175;
|
||||||
|
--m-bg: 10 14 30;
|
||||||
|
--m-error: 255 70 70;
|
||||||
|
--m-success: 0 220 180;
|
||||||
|
--m-accent: 80 140 255;
|
||||||
|
--m-warning: 255 180 50;
|
||||||
|
--m-shadow-opacity: 0.4;
|
||||||
|
--m-glow-opacity: 0.1;
|
||||||
|
--m-card-border-opacity: 0.1;
|
||||||
|
--m-shimmer-from: rgba(80, 140, 255, 0.05);
|
||||||
|
--m-shimmer-to: rgba(80, 140, 255, 0.12);
|
||||||
|
--m-sidebar-from: 15 20 40;
|
||||||
|
--m-sidebar-to: 15 18 35;
|
||||||
|
--m-sidebar-border: rgba(80, 140, 255, 0.08);
|
||||||
|
--m-sidebar-divider: rgba(80, 140, 255, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
99
components/BackupButtonSee.vue
Normal file
99
components/BackupButtonSee.vue
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<div class="backup-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="card-title">Backup</h2>
|
||||||
|
<span class="font-mono text-[10px] text-m-muted tracking-widest uppercase">Dossiers</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="backup-list">
|
||||||
|
<button
|
||||||
|
v-for="item in folders"
|
||||||
|
:key="item.name"
|
||||||
|
type="button"
|
||||||
|
class="backup-btn"
|
||||||
|
:class="{ 'backup-btn-active': active === item.name }"
|
||||||
|
@click="select(item.name)"
|
||||||
|
>
|
||||||
|
<div class="flex items-center gap-2.5">
|
||||||
|
<IconifyIcon :icon="item.icon" class="text-base text-m-accent" />
|
||||||
|
<span class="font-display text-sm font-semibold uppercase tracking-wide">
|
||||||
|
{{ item.name }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<IconifyIcon
|
||||||
|
icon="mdi:chevron-right"
|
||||||
|
class="text-lg text-m-muted transition-transform duration-200"
|
||||||
|
:class="{ 'translate-x-0.5 !text-m-accent': active === item.name }"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { Icon as IconifyIcon } from "@iconify/vue"
|
||||||
|
import backupOptions from "~/server/config/backup-options.json"
|
||||||
|
|
||||||
|
const emit = defineEmits(["select"])
|
||||||
|
const active = ref<string | null>(null)
|
||||||
|
const folders = backupOptions as Array<{ name: string; icon: string }>
|
||||||
|
|
||||||
|
const select = (name: string) => {
|
||||||
|
active.value = name
|
||||||
|
emit("select", name)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.backup-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.625rem 0.875rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border: 1px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn:hover {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.15);
|
||||||
|
background: rgb(var(--m-accent) / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn-active {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.25);
|
||||||
|
background: rgb(var(--m-accent) / 0.08);
|
||||||
|
box-shadow: 0 0 12px -4px rgb(var(--m-accent) / 0.15);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
150
components/BackupList.vue
Normal file
150
components/BackupList.vue
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<template>
|
||||||
|
<div class="backup-list-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="card-title">{{ title }}</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!folder" class="empty-state">
|
||||||
|
<IconifyIcon icon="mdi:folder-open-outline" class="text-3xl text-m-muted/40" />
|
||||||
|
<p class="mt-2 font-mono text-xs text-m-muted/50">
|
||||||
|
Selectionnez un dossier
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="loading" class="file-list">
|
||||||
|
<div
|
||||||
|
v-for="n in 6"
|
||||||
|
:key="`backup-skeleton-${n}`"
|
||||||
|
class="file-row animate-shimmer"
|
||||||
|
>
|
||||||
|
<TextSkeleton custom-class="h-4 w-48" />
|
||||||
|
<CircleSkeleton custom-class="h-5 w-5 rounded" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="backups.length === 0" class="empty-state">
|
||||||
|
<IconifyIcon icon="mdi:file-hidden" class="text-3xl text-m-muted/40" />
|
||||||
|
<p class="mt-2 font-mono text-xs text-m-muted/50">
|
||||||
|
Aucun backup trouve
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="file-list">
|
||||||
|
<button
|
||||||
|
v-for="file in backups"
|
||||||
|
:key="file"
|
||||||
|
class="file-row"
|
||||||
|
@click="downloadBackup(file)"
|
||||||
|
>
|
||||||
|
<div class="flex min-w-0 items-center gap-2.5">
|
||||||
|
<IconifyIcon icon="mdi:file-document-outline" class="text-base text-m-accent flex-shrink-0" />
|
||||||
|
<span class="truncate font-mono text-xs text-m-text">
|
||||||
|
{{ file }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<IconifyIcon
|
||||||
|
icon="mdi:download"
|
||||||
|
class="text-base text-m-muted flex-shrink-0 transition-colors duration-200"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {Icon as IconifyIcon} from "@iconify/vue"
|
||||||
|
import CircleSkeleton from "~/components/skeleton/CircleSkeleton.vue"
|
||||||
|
import TextSkeleton from "~/components/skeleton/TextSkeleton.vue"
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
folder: string | null
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const backups = ref<string[]>([])
|
||||||
|
const loading = ref(false)
|
||||||
|
const title = computed(() => {
|
||||||
|
if (!props.folder) return "Fichiers"
|
||||||
|
return `Backup — ${props.folder.toUpperCase()}`
|
||||||
|
})
|
||||||
|
|
||||||
|
const downloadBackup = (file: string) => {
|
||||||
|
if (!props.folder) return
|
||||||
|
const url = `/api/download?folder=${encodeURIComponent(props.folder)}&file=${encodeURIComponent(file)}`
|
||||||
|
window.location.href = url
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => props.folder, async (folder) => {
|
||||||
|
if (!folder) {
|
||||||
|
loading.value = false
|
||||||
|
backups.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await $fetch<string[]>(`/api/backups?folder=${folder}`)
|
||||||
|
backups.value = data.slice(0, 6)
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Erreur récupération backups:", error)
|
||||||
|
backups.value = []
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.backup-list-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 2.5rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-row {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.625rem 0.875rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border: 1px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-row:hover {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.15);
|
||||||
|
background: rgb(var(--m-accent) / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-row:hover .text-m-muted {
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
201
components/BackupRun.vue
Normal file
201
components/BackupRun.vue
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<template>
|
||||||
|
<div class="backup-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="card-title">Run Script</h2>
|
||||||
|
<span class="font-mono text-[10px] text-m-muted tracking-widest uppercase">Scripts</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="loading" class="status-box">
|
||||||
|
Chargement des scripts...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="backup-list">
|
||||||
|
<button
|
||||||
|
v-for="item in scripts"
|
||||||
|
:key="item.key"
|
||||||
|
type="button"
|
||||||
|
class="backup-btn"
|
||||||
|
:class="{ 'backup-btn-active': active === item.key }"
|
||||||
|
:disabled="runningKey !== null"
|
||||||
|
@click="runScript(item.key)"
|
||||||
|
>
|
||||||
|
<div class="flex items-center gap-2.5">
|
||||||
|
<IconifyIcon :icon="item.icon" class="text-base text-m-accent" />
|
||||||
|
<span class="font-display text-sm font-semibold uppercase tracking-wide">
|
||||||
|
{{ item.label }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<IconifyIcon
|
||||||
|
:icon="runningKey === item.key ? 'mdi:loading' : 'mdi:play'"
|
||||||
|
class="text-lg text-m-muted transition-transform duration-200"
|
||||||
|
:class="{
|
||||||
|
'translate-x-0.5 !text-m-accent': active === item.key,
|
||||||
|
'animate-spin': runningKey === item.key
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="message" class="status-box" :class="statusClass">
|
||||||
|
<p class="status-title">{{ message }}</p>
|
||||||
|
<pre v-if="output" class="status-output">{{ output }}</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, onMounted, ref } from "vue"
|
||||||
|
import { Icon as IconifyIcon } from "@iconify/vue"
|
||||||
|
|
||||||
|
type BackupScript = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type BackupScriptListResponse = {
|
||||||
|
scripts: BackupScript[]
|
||||||
|
}
|
||||||
|
|
||||||
|
type BackupScriptRunResponse = {
|
||||||
|
ok: boolean
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
output: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const active = ref<string | null>(null)
|
||||||
|
const loading = ref(true)
|
||||||
|
const runningKey = ref<string | null>(null)
|
||||||
|
const scripts = ref<BackupScript[]>([])
|
||||||
|
const output = ref("")
|
||||||
|
const message = ref("")
|
||||||
|
const isError = ref(false)
|
||||||
|
|
||||||
|
const statusClass = computed(() => (isError.value ? "status-error" : "status-success"))
|
||||||
|
|
||||||
|
const loadScripts = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await $fetch<BackupScriptListResponse>("/api/backup-script")
|
||||||
|
scripts.value = data.scripts
|
||||||
|
} catch (error) {
|
||||||
|
isError.value = true
|
||||||
|
message.value = `Erreur chargement scripts: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const runScript = async (key: string) => {
|
||||||
|
active.value = key
|
||||||
|
runningKey.value = key
|
||||||
|
output.value = ""
|
||||||
|
message.value = ""
|
||||||
|
isError.value = false
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await $fetch<BackupScriptRunResponse>("/api/backup-script", {
|
||||||
|
method: "POST",
|
||||||
|
body: { key }
|
||||||
|
})
|
||||||
|
message.value = `${data.label} execute`
|
||||||
|
output.value = data.output
|
||||||
|
} catch (error: any) {
|
||||||
|
isError.value = true
|
||||||
|
message.value = error?.data?.statusMessage || "Erreur execution script"
|
||||||
|
output.value = ""
|
||||||
|
} finally {
|
||||||
|
runningKey.value = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(loadScripts)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.backup-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.375rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.625rem 0.875rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border: 1px solid transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn:disabled {
|
||||||
|
cursor: wait;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn:hover {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.15);
|
||||||
|
background: rgb(var(--m-accent) / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-btn-active {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.25);
|
||||||
|
background: rgb(var(--m-accent) / 0.08);
|
||||||
|
box-shadow: 0 0 12px -4px rgb(var(--m-accent) / 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-box {
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 0.875rem;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-success {
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-error {
|
||||||
|
border: 1px solid rgb(255 99 99 / 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-title {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-output {
|
||||||
|
margin: 0.75rem 0 0;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
121
components/DiagramStorage.vue
Normal file
121
components/DiagramStorage.vue
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<section class="storage-card">
|
||||||
|
<template v-if="item.loading">
|
||||||
|
<TextSkeleton custom-class="h-5 w-28" />
|
||||||
|
<CircleSkeleton custom-class="mt-3 h-[120px] w-[120px]" />
|
||||||
|
<BlockSkeleton custom-class="mt-3 h-4 w-32" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<p class="font-mono text-[11px] font-medium uppercase tracking-[0.2em] text-white/60">
|
||||||
|
{{ item.hostName }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="chart-wrapper" :class="item.statusColorClass">
|
||||||
|
<svg class="chart-svg" viewBox="0 0 120 120" aria-label="Pourcentage restant">
|
||||||
|
<circle
|
||||||
|
class="track"
|
||||||
|
cx="60" cy="60"
|
||||||
|
:r="item.chartRadius"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
class="progress"
|
||||||
|
cx="60" cy="60"
|
||||||
|
:r="item.chartRadius"
|
||||||
|
:style="{
|
||||||
|
strokeDasharray: `${item.chartCircumference}`,
|
||||||
|
strokeDashoffset: `${item.chartOffset}`
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<div class="chart-label">
|
||||||
|
<strong class="font-mono text-2xl font-bold leading-none">
|
||||||
|
{{ item.remainingPercentText }}
|
||||||
|
</strong>
|
||||||
|
<span class="mt-1 font-mono text-[9px] uppercase tracking-widest text-m-muted">
|
||||||
|
libre
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="font-mono text-xs font-medium text-m-muted/80">
|
||||||
|
{{ item.usedText }}
|
||||||
|
<span class="mx-0.5 text-m-muted/40">/</span>
|
||||||
|
{{ item.totalText }}
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import CircleSkeleton from "~/components/skeleton/CircleSkeleton.vue"
|
||||||
|
import BlockSkeleton from "~/components/skeleton/BlockSkeleton.vue"
|
||||||
|
import TextSkeleton from "~/components/skeleton/TextSkeleton.vue"
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
item: {
|
||||||
|
loading: boolean
|
||||||
|
hostName: string
|
||||||
|
statusColorClass: string
|
||||||
|
chartRadius: number
|
||||||
|
chartCircumference: number
|
||||||
|
chartOffset: number
|
||||||
|
remainingPercentText: string
|
||||||
|
usedText: string
|
||||||
|
totalText: string
|
||||||
|
}
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.storage-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 1.25rem 1rem;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.track {
|
||||||
|
fill: none;
|
||||||
|
stroke: rgba(255, 255, 255, 0.06);
|
||||||
|
stroke-width: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
fill: none;
|
||||||
|
stroke: currentColor;
|
||||||
|
stroke-width: 8;
|
||||||
|
stroke-linecap: round;
|
||||||
|
transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-label {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-success {
|
||||||
|
color: rgb(var(--m-success));
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-error {
|
||||||
|
color: rgb(var(--m-error));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
108
components/MessageDiscord.vue
Normal file
108
components/MessageDiscord.vue
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<script setup>
|
||||||
|
import {Icon as IconifyIcon} from "@iconify/vue"
|
||||||
|
const { data: messages } = await useFetch('/api/discord/messages')
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="discord-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="flex items-center gap-2.5">
|
||||||
|
<IconifyIcon icon="mdi:message-text" class="text-lg text-m-accent" />
|
||||||
|
<h2 class="card-title">Discord</h2>
|
||||||
|
</div>
|
||||||
|
<span class="font-mono text-[10px] text-m-muted tracking-widest uppercase">Messages</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!messages || messages.length === 0" class="empty-state">
|
||||||
|
<IconifyIcon icon="mdi:chat-outline" class="text-3xl text-m-muted/40" />
|
||||||
|
<p class="mt-2 font-mono text-xs text-m-muted/50">
|
||||||
|
Aucun message
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="message-list">
|
||||||
|
<div
|
||||||
|
v-for="m in messages"
|
||||||
|
:key="m.id"
|
||||||
|
class="message-row"
|
||||||
|
>
|
||||||
|
<div class="message-avatar">
|
||||||
|
{{ m.author.username.charAt(0).toUpperCase() }}
|
||||||
|
</div>
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
<span class="font-display text-xs font-semibold text-m-accent">
|
||||||
|
{{ m.author.username }}
|
||||||
|
</span>
|
||||||
|
<p class="mt-0.5 break-words font-display text-sm leading-relaxed text-m-text/80">
|
||||||
|
{{ m.content }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.discord-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
max-height: calc(100vh - 7rem);
|
||||||
|
overflow: hidden;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 2rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
max-height: calc(100vh - 12rem);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.75rem;
|
||||||
|
padding: 0.75rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-avatar {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: linear-gradient(135deg, rgb(var(--m-accent) / 0.2), rgb(var(--m-success) / 0.15));
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
192
components/Speedtest.vue
Normal file
192
components/Speedtest.vue
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<div class="speedtest-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="card-title">Speedtest</h2>
|
||||||
|
<button
|
||||||
|
class="reload-btn"
|
||||||
|
@click="runTests"
|
||||||
|
:disabled="isTesting"
|
||||||
|
>
|
||||||
|
<IconifyIcon
|
||||||
|
icon="mdi:reload"
|
||||||
|
class="text-lg"
|
||||||
|
:class="{ 'animate-spin': isTesting }"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="metrics-grid">
|
||||||
|
<div v-for="metric in metrics" :key="metric.label" class="metric-card">
|
||||||
|
<div class="metric-header">
|
||||||
|
<IconifyIcon :icon="metric.icon" class="text-lg text-m-accent" />
|
||||||
|
<span class="font-mono text-[10px] font-medium uppercase tracking-[0.15em] text-m-muted">
|
||||||
|
{{ metric.label }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="metric-value-area">
|
||||||
|
<template v-if="isTesting">
|
||||||
|
<div class="h-10 w-16 animate-shimmer rounded" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<span class="metric-value font-mono">
|
||||||
|
{{ metric.value !== null ? metric.value : "--" }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<span class="metric-unit font-mono">{{ metric.unit }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {computed, ref} from "vue"
|
||||||
|
import {Icon as IconifyIcon} from "@iconify/vue"
|
||||||
|
|
||||||
|
const ping = ref<number | null>(null)
|
||||||
|
const download = ref<number | null>(null)
|
||||||
|
const upload = ref<number | null>(null)
|
||||||
|
const isTesting = ref(false)
|
||||||
|
|
||||||
|
const metrics = computed(() => [
|
||||||
|
{ label: "Download", icon: "mdi:arrow-down-bold", value: download.value, unit: "Mbps" },
|
||||||
|
{ label: "Upload", icon: "mdi:arrow-up-bold", value: upload.value, unit: "Mbps" },
|
||||||
|
{ label: "Ping", icon: "mdi:signal", value: ping.value, unit: "ms" },
|
||||||
|
])
|
||||||
|
|
||||||
|
async function testDownload() {
|
||||||
|
const start = performance.now()
|
||||||
|
const res = await fetch('/api/download')
|
||||||
|
const blob = await res.blob()
|
||||||
|
const end = performance.now()
|
||||||
|
const size = blob.size
|
||||||
|
const seconds = (end - start) / 1000
|
||||||
|
download.value = Math.round((size * 8) / seconds / 1000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testUpload() {
|
||||||
|
const size = 5 * 1024 * 1024
|
||||||
|
const data = new Uint8Array(size)
|
||||||
|
const start = performance.now()
|
||||||
|
await fetch('/api/upload', { method: 'POST', body: data })
|
||||||
|
const end = performance.now()
|
||||||
|
const seconds = (end - start) / 1000
|
||||||
|
upload.value = Math.round((size * 8) / seconds / 1000000)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testPing() {
|
||||||
|
const start = performance.now()
|
||||||
|
await fetch('/api/ping')
|
||||||
|
const end = performance.now()
|
||||||
|
ping.value = Math.round(end - start)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function runTests() {
|
||||||
|
isTesting.value = true
|
||||||
|
download.value = null
|
||||||
|
upload.value = null
|
||||||
|
ping.value = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
await testDownload()
|
||||||
|
await testUpload()
|
||||||
|
await testPing()
|
||||||
|
} finally {
|
||||||
|
isTesting.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.speedtest-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.reload-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.12);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reload-btn:hover:not(:disabled) {
|
||||||
|
background: rgb(var(--m-accent) / 0.12);
|
||||||
|
border-color: rgb(var(--m-accent) / 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reload-btn:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metrics-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-card {
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 1rem;
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.06);
|
||||||
|
transition: border-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-card:hover {
|
||||||
|
border-color: rgb(var(--m-accent) / 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-value-area {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-value {
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric-unit {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
font-weight: 500;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.1em;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
181
components/StatusSite.vue
Normal file
181
components/StatusSite.vue
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<template>
|
||||||
|
<div class="status-card card-glow">
|
||||||
|
<div class="card-header">
|
||||||
|
<h2 class="card-title">Status</h2>
|
||||||
|
<span class="font-mono text-[10px] text-m-muted tracking-widest uppercase">Services</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template v-if="loading">
|
||||||
|
<div
|
||||||
|
v-for="n in 3"
|
||||||
|
:key="`skeleton-${n}`"
|
||||||
|
class="status-row animate-shimmer"
|
||||||
|
>
|
||||||
|
<div class="flex items-center gap-3">
|
||||||
|
<CircleSkeleton custom-class="h-3 w-3" />
|
||||||
|
<TextSkeleton custom-class="h-4 w-20" />
|
||||||
|
</div>
|
||||||
|
<TextSkeleton custom-class="h-4 w-16" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
|
v-for="row in rows"
|
||||||
|
:key="`${row.label}-${row.url}`"
|
||||||
|
class="status-row"
|
||||||
|
:class="row.status === 200 ? 'row-ok' : 'row-error'"
|
||||||
|
>
|
||||||
|
<div class="flex items-center gap-3">
|
||||||
|
<span class="status-dot" :class="row.status === 200 ? 'dot-ok' : 'dot-error'" />
|
||||||
|
<span class="font-display text-sm font-semibold text-m-text">
|
||||||
|
{{ row.label }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span class="font-mono text-xs" :class="row.status === 200 ? 'text-m-success' : 'text-m-error'">
|
||||||
|
{{ statusLabel(row.status) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import CircleSkeleton from "~/components/skeleton/CircleSkeleton.vue"
|
||||||
|
import TextSkeleton from "~/components/skeleton/TextSkeleton.vue"
|
||||||
|
import {onBeforeUnmount, onMounted, ref} from "vue"
|
||||||
|
|
||||||
|
interface StatusRow {
|
||||||
|
label: string
|
||||||
|
url: string
|
||||||
|
ok: boolean
|
||||||
|
status: number
|
||||||
|
checkedAt: string
|
||||||
|
error?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface StatusResponse {
|
||||||
|
results: StatusRow[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
endpoint?: string
|
||||||
|
refreshMs?: number
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
endpoint: "/api/version-status",
|
||||||
|
refreshMs: 30000
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
const rows = ref<StatusRow[]>([])
|
||||||
|
const loading = ref(true)
|
||||||
|
const initialized = ref(false)
|
||||||
|
let timer: ReturnType<typeof setInterval> | null = null
|
||||||
|
|
||||||
|
const statusLabel = (status: number) => {
|
||||||
|
if (status === 200) return "HTTP 200"
|
||||||
|
if (status === 0) return "Injoignable"
|
||||||
|
return `KO (${status})`
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkStatus = async () => {
|
||||||
|
if (!initialized.value) {
|
||||||
|
loading.value = true
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const data = await $fetch<StatusResponse>(props.endpoint)
|
||||||
|
rows.value = data.results
|
||||||
|
} catch (error) {
|
||||||
|
rows.value = [
|
||||||
|
{
|
||||||
|
label: "Erreur",
|
||||||
|
url: props.endpoint,
|
||||||
|
ok: false,
|
||||||
|
status: 0,
|
||||||
|
checkedAt: new Date().toISOString(),
|
||||||
|
error: error instanceof Error ? error.message : String(error)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} finally {
|
||||||
|
initialized.value = true
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
checkStatus()
|
||||||
|
timer = setInterval(checkStatus, props.refreshMs)
|
||||||
|
})
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer)
|
||||||
|
timer = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.status-card {
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.625rem;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgb(var(--m-tertiary));
|
||||||
|
border: 1px solid transparent;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row-ok {
|
||||||
|
border-color: rgb(var(--m-success) / 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.row-error {
|
||||||
|
border-color: rgb(var(--m-error) / 0.1);
|
||||||
|
background: rgb(var(--m-error) / 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-dot {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot-ok {
|
||||||
|
background: rgb(var(--m-success));
|
||||||
|
box-shadow: 0 0 6px rgb(var(--m-success) / 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot-error {
|
||||||
|
background: rgb(var(--m-error));
|
||||||
|
box-shadow: 0 0 6px rgb(var(--m-error) / 0.5);
|
||||||
|
animation: pulse-glow 2s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
14
components/skeleton/BlockSkeleton.vue
Normal file
14
components/skeleton/BlockSkeleton.vue
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div class="animate-pulse rounded-md bg-m-tertiary/70" :class="customClass" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
customClass?: string
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
customClass: "h-4 w-full"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
17
components/skeleton/ButtonSkeleton.vue
Normal file
17
components/skeleton/ButtonSkeleton.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="animate-pulse rounded-md bg-m-tertiary/70 shadow-md/50 shadow-m-black"
|
||||||
|
:class="customClass"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
customClass?: string
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
customClass: "h-[39px] w-full"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
14
components/skeleton/CircleSkeleton.vue
Normal file
14
components/skeleton/CircleSkeleton.vue
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div class="animate-pulse rounded-full bg-m-tertiary/70" :class="customClass" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
customClass?: string
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
customClass: "h-10 w-10"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
14
components/skeleton/TextSkeleton.vue
Normal file
14
components/skeleton/TextSkeleton.vue
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div class="animate-pulse rounded bg-m-tertiary/70" :class="customClass" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
customClass?: string
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
customClass: "h-5 w-24"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
489
layouts/default.vue
Normal file
489
layouts/default.vue
Normal file
@@ -0,0 +1,489 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page-layout">
|
||||||
|
<aside class="sidebar" aria-label="Navigation principale">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="logo-container">
|
||||||
|
<img
|
||||||
|
:src="logoSrc"
|
||||||
|
alt="Logo Malio"
|
||||||
|
class="logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="brand-copy">
|
||||||
|
<p class="brand-title">Supervisor</p>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-divider" />
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content">
|
||||||
|
<slot name="sidebar" />
|
||||||
|
<nav class="sidebar-nav" aria-label="Sections">
|
||||||
|
<p class="nav-label">Navigation</p>
|
||||||
|
<NuxtLink
|
||||||
|
v-for="item in navItems"
|
||||||
|
:key="item.to"
|
||||||
|
v-slot="{ href, navigate, isExactActive }"
|
||||||
|
:to="item.to"
|
||||||
|
custom
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
:href="href"
|
||||||
|
class="nav-link"
|
||||||
|
:class="{ 'nav-link-active': isExactActive }"
|
||||||
|
:aria-current="isExactActive ? 'page' : undefined"
|
||||||
|
@click="navigate(); isMenuOpen = false"
|
||||||
|
>
|
||||||
|
<span class="nav-link-main">
|
||||||
|
<span class="nav-icon">
|
||||||
|
<IconifyIcon :icon="item.icon" class="text-lg" />
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<span class="nav-title">{{ item.label }}</span>
|
||||||
|
<span class="nav-caption">{{ item.caption }}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="nav-pill">{{ item.short }}</span>
|
||||||
|
</a>
|
||||||
|
</NuxtLink>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-footer">
|
||||||
|
<div class="sidebar-divider" />
|
||||||
|
<div class="footer-row">
|
||||||
|
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
||||||
|
Supervisor {{ appVersion }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<button class="mobile-menu-button" type="button" @click="isMenuOpen = true">
|
||||||
|
<IconifyIcon icon="mdi:menu" class="text-2xl" />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div v-if="isMenuOpen" class="mobile-menu-backdrop" @click="isMenuOpen = false" />
|
||||||
|
|
||||||
|
<aside v-if="isMenuOpen" class="mobile-sidebar" aria-label="Navigation mobile">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="logo-container">
|
||||||
|
<img
|
||||||
|
:src="logoSrc"
|
||||||
|
alt="Logo Malio"
|
||||||
|
class="logo"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="brand-copy">
|
||||||
|
<p class="brand-kicker">Control Center</p>
|
||||||
|
<p class="brand-title">Supervisor</p>
|
||||||
|
<p class="brand-description">
|
||||||
|
Tableau de bord interne pour le monitoring et les sauvegardes.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-divider" />
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-content">
|
||||||
|
<slot name="sidebar" />
|
||||||
|
<nav class="sidebar-nav" aria-label="Sections mobiles">
|
||||||
|
<p class="nav-label">Navigation</p>
|
||||||
|
<NuxtLink
|
||||||
|
v-for="item in navItems"
|
||||||
|
:key="`mobile-${item.to}`"
|
||||||
|
v-slot="{ href, navigate, isExactActive }"
|
||||||
|
:to="item.to"
|
||||||
|
custom
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
:href="href"
|
||||||
|
class="nav-link"
|
||||||
|
:class="{ 'nav-link-active': isExactActive }"
|
||||||
|
:aria-current="isExactActive ? 'page' : undefined"
|
||||||
|
@click="navigate(); isMenuOpen = false"
|
||||||
|
>
|
||||||
|
<span class="nav-link-main">
|
||||||
|
<span class="nav-icon">
|
||||||
|
<IconifyIcon :icon="item.icon" class="text-lg" />
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<span class="nav-title">{{ item.label }}</span>
|
||||||
|
<span class="nav-caption">{{ item.caption }}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="nav-pill">{{ item.short }}</span>
|
||||||
|
</a>
|
||||||
|
</NuxtLink>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar-footer">
|
||||||
|
<div class="sidebar-divider" />
|
||||||
|
<div class="status-card">
|
||||||
|
<p class="status-label">Environnement</p>
|
||||||
|
<p class="status-value">Production</p>
|
||||||
|
<p class="status-description">
|
||||||
|
Navigation rapide vers les vues principales de supervision.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="footer-row">
|
||||||
|
<p class="font-mono text-[10px] tracking-widest uppercase text-white/40">
|
||||||
|
Supervisor {{ appVersion }}
|
||||||
|
</p>
|
||||||
|
<button class="close-button" type="button" @click="isMenuOpen = false">
|
||||||
|
<IconifyIcon icon="mdi:close" class="text-xl" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<main class="content bg-noise">
|
||||||
|
<slot />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { Icon as IconifyIcon } from "@iconify/vue"
|
||||||
|
import logoSrc from '~/assets/LOGO_CARRE_BLANC.png'
|
||||||
|
|
||||||
|
const {
|
||||||
|
public: { appVersion }
|
||||||
|
} = useRuntimeConfig()
|
||||||
|
const isMenuOpen = ref(false)
|
||||||
|
const navItems = [
|
||||||
|
{
|
||||||
|
to: "/",
|
||||||
|
label: "Monitoring",
|
||||||
|
caption: "Etat global et disponibilite",
|
||||||
|
short: "MON",
|
||||||
|
icon: "mdi:chart-box-outline"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
to: "/backup",
|
||||||
|
label: "Backup",
|
||||||
|
caption: "Scripts et fichiers archives",
|
||||||
|
short: "BKP",
|
||||||
|
icon: "mdi:database-arrow-up-outline"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page-layout {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 260px 1fr;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar,
|
||||||
|
.mobile-sidebar {
|
||||||
|
background: linear-gradient(
|
||||||
|
180deg,
|
||||||
|
rgb(var(--m-sidebar-from)) 0%,
|
||||||
|
rgb(var(--m-sidebar-to)) 100%
|
||||||
|
);
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-right: 1px solid var(--m-sidebar-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
transition: background 0.4s ease, border-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-header {
|
||||||
|
padding: 1.5rem 2rem 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-copy {
|
||||||
|
padding: 0.5rem 0 0.75rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-kicker {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
letter-spacing: 0.18em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-title {
|
||||||
|
margin: 0.45rem 0 0;
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.45rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-description {
|
||||||
|
margin: 0.55rem 0 0;
|
||||||
|
color: rgb(255 255 255 / 0.58);
|
||||||
|
line-height: 1.6;
|
||||||
|
font-size: 0.92rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
height: 100px;
|
||||||
|
width: 100px;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(0 0 20px rgba(80, 140, 255, 0.15));
|
||||||
|
transition: filter 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo:hover {
|
||||||
|
filter: drop-shadow(0 0 28px rgba(80, 140, 255, 0.3));
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-content {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0.5rem 1rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-footer {
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-divider {
|
||||||
|
height: 1px;
|
||||||
|
margin: 0.75rem 1.5rem;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
transparent,
|
||||||
|
var(--m-sidebar-divider),
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0.5rem 1.5rem 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-label {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0.75rem 0.25rem;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
letter-spacing: 0.18em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(255 255 255 / 0.38);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 0.75rem;
|
||||||
|
padding: 0.85rem 0.9rem;
|
||||||
|
border-radius: 14px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
transition:
|
||||||
|
background-color 0.2s ease,
|
||||||
|
border-color 0.2s ease,
|
||||||
|
transform 0.2s ease,
|
||||||
|
box-shadow 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link:hover {
|
||||||
|
background: rgb(255 255 255 / 0.06);
|
||||||
|
border-color: rgb(var(--m-accent) / 0.14);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link:focus-visible {
|
||||||
|
outline: 2px solid rgb(var(--m-accent));
|
||||||
|
outline-offset: 2px;
|
||||||
|
background: rgb(255 255 255 / 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link-active {
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgb(var(--m-accent) / 0.16), rgb(255 255 255 / 0.04));
|
||||||
|
border-color: rgb(var(--m-accent) / 0.24);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link-main {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.8rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: rgb(255 255 255 / 0.06);
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-title,
|
||||||
|
.nav-caption {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-title {
|
||||||
|
font-size: 0.96rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-caption {
|
||||||
|
margin-top: 0.2rem;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
line-height: 1.45;
|
||||||
|
color: rgb(255 255 255 / 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-pill {
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 0.28rem 0.45rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
color: rgb(255 255 255 / 0.62);
|
||||||
|
background: rgb(255 255 255 / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-card {
|
||||||
|
margin: 0 1rem;
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 16px;
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.14);
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at top right, rgb(var(--m-accent) / 0.14), transparent 30%),
|
||||||
|
rgb(255 255 255 / 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-label {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.68rem;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(255 255 255 / 0.42);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-value {
|
||||||
|
margin: 0.5rem 0 0;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-description {
|
||||||
|
margin: 0.45rem 0 0;
|
||||||
|
font-size: 0.82rem;
|
||||||
|
line-height: 1.55;
|
||||||
|
color: rgb(255 255 255 / 0.54);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
background: rgb(var(--m-bg));
|
||||||
|
overflow-y: auto;
|
||||||
|
min-height: 100vh;
|
||||||
|
transition: background-color 0.4s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-menu-button,
|
||||||
|
.mobile-menu-backdrop,
|
||||||
|
.mobile-sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
.page-layout {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-menu-button {
|
||||||
|
position: fixed;
|
||||||
|
top: 1rem;
|
||||||
|
left: 1rem;
|
||||||
|
z-index: 40;
|
||||||
|
display: flex;
|
||||||
|
height: 44px;
|
||||||
|
width: 44px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.18);
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-menu-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 45;
|
||||||
|
display: block;
|
||||||
|
background: rgba(3, 8, 20, 0.55);
|
||||||
|
backdrop-filter: blur(3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-sidebar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 50;
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
width: min(84vw, 320px);
|
||||||
|
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-content {
|
||||||
|
padding-right: 0.9rem;
|
||||||
|
padding-left: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
padding: 0.8rem 0.85rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
33
nuxt.config.ts
Normal file
33
nuxt.config.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import { execSync } from "node:child_process"
|
||||||
|
import tailwindcss from "@tailwindcss/vite"
|
||||||
|
|
||||||
|
const getRepoVersion = () => {
|
||||||
|
try {
|
||||||
|
const tags = execSync(
|
||||||
|
"git for-each-ref --sort=-version:refname --format='%(refname:short)' refs/tags",
|
||||||
|
{ encoding: "utf8" }
|
||||||
|
)
|
||||||
|
.split("\n")
|
||||||
|
.map((tag) => tag.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
|
||||||
|
return tags[0] || "dev"
|
||||||
|
} catch {
|
||||||
|
return "dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
compatibilityDate: "2025-07-15",
|
||||||
|
devtools: { enabled: true },
|
||||||
|
css: ["~/assets/css/main.css"],
|
||||||
|
runtimeConfig: {
|
||||||
|
public: {
|
||||||
|
appVersion: getRepoVersion()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
vite: {
|
||||||
|
plugins: [tailwindcss()]
|
||||||
|
}
|
||||||
|
})
|
||||||
15910
package-lock.json
generated
Normal file
15910
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "disk-monitor",
|
||||||
|
"type": "module",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"build": "nuxt build",
|
||||||
|
"dev": "nuxt dev",
|
||||||
|
"generate": "nuxt generate",
|
||||||
|
"preview": "nuxt preview",
|
||||||
|
"postinstall": "nuxt prepare"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@iconify/vue": "^5.0.0",
|
||||||
|
"nuxt": "^4.3.1",
|
||||||
|
"vue": "^3.5.29",
|
||||||
|
"vue-router": "^4.6.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"@semantic-release/github": "^12.0.6",
|
||||||
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
||||||
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
|
"semantic-release": "^25.0.3",
|
||||||
|
"tailwindcss": "^4.2.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
278
pages/backup.vue
Normal file
278
pages/backup.vue
Normal file
@@ -0,0 +1,278 @@
|
|||||||
|
<template>
|
||||||
|
<NuxtLayout name="default">
|
||||||
|
<div class="dashboard-container">
|
||||||
|
<header class="dashboard-header">
|
||||||
|
<div class="header-copy">
|
||||||
|
<p class="section-kicker">Operations</p>
|
||||||
|
<h1 class="font-display text-3xl font-bold tracking-tight text-m-text">
|
||||||
|
Backup
|
||||||
|
</h1>
|
||||||
|
<p class="header-description">
|
||||||
|
Centralisez la selection des dossiers, l'execution des scripts et le telechargement
|
||||||
|
des fichiers depuis une seule vue.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="dashboard-grid">
|
||||||
|
<section class="grid-left" aria-label="Commandes de sauvegarde">
|
||||||
|
<BackupButtonSee
|
||||||
|
class="animate-fade-in-up backup-selector"
|
||||||
|
style="animation-delay: 120ms"
|
||||||
|
@select="selectedBackup = $event"
|
||||||
|
/>
|
||||||
|
<BackupRun
|
||||||
|
class="animate-fade-in-up"
|
||||||
|
style="animation-delay: 180ms"
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="grid-middle" aria-labelledby="backup-files-title">
|
||||||
|
<div class="files-panel animate-fade-in-up" style="animation-delay: 240ms">
|
||||||
|
<div class="files-panel-header">
|
||||||
|
<div>
|
||||||
|
<p class="section-kicker">Fichiers</p>
|
||||||
|
<h2 id="backup-files-title" class="files-panel-title">
|
||||||
|
Historique des sauvegardes
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<p class="files-panel-meta">
|
||||||
|
{{ selectedBackup ? `Source ${selectedBackup}` : "En attente de selection" }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<BackupList
|
||||||
|
class="backup-list-mobile"
|
||||||
|
:folder="selectedBackup"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</NuxtLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue"
|
||||||
|
import BackupRun from "~/components/BackupRun.vue"
|
||||||
|
|
||||||
|
definePageMeta({ layout: false })
|
||||||
|
|
||||||
|
const selectedBackup = ref<string | null>(null)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dashboard-container {
|
||||||
|
padding: 2rem 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-header {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
|
||||||
|
gap: 1.5rem;
|
||||||
|
align-items: end;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-copy {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-kicker {
|
||||||
|
margin: 0 0 0.5rem;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.7rem;
|
||||||
|
letter-spacing: 0.18em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-description {
|
||||||
|
max-width: 62ch;
|
||||||
|
margin-top: 0.9rem;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
line-height: 1.65;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-card {
|
||||||
|
padding: 1.25rem;
|
||||||
|
border-radius: 16px;
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgb(var(--m-secondary)), rgb(var(--m-tertiary)));
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-label {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.7rem;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-value {
|
||||||
|
margin: 0.65rem 0 0;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-description {
|
||||||
|
margin: 0.5rem 0 0;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-panel {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: 20px;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at top right, rgb(var(--m-accent) / 0.12), transparent 28%),
|
||||||
|
linear-gradient(180deg, rgb(var(--m-secondary)), rgb(var(--m-secondary) / 0.82));
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-panel::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.08);
|
||||||
|
border-radius: inherit;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-title {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: clamp(1.5rem, 2.2vw, 2rem);
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.15;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-description {
|
||||||
|
max-width: 68ch;
|
||||||
|
margin: 0.85rem 0 0;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
gap: 1rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-step {
|
||||||
|
padding: 1rem;
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.08);
|
||||||
|
border-radius: 16px;
|
||||||
|
background: rgb(var(--m-bg) / 0.24);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-index {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
|
color: rgb(var(--m-accent));
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-title {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-text {
|
||||||
|
margin: 0.45rem 0 0;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 300px minmax(0, 1fr);
|
||||||
|
gap: 1.5rem;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-left,
|
||||||
|
.grid-middle {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel {
|
||||||
|
padding: 1.25rem;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: rgb(var(--m-secondary) / 0.4);
|
||||||
|
border: 1px solid rgb(var(--m-accent) / 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: end;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel-title {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-display);
|
||||||
|
font-size: 1.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgb(var(--m-text));
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel-meta {
|
||||||
|
margin: 0;
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.75rem;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: rgb(var(--m-muted));
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1180px) {
|
||||||
|
.dashboard-header,
|
||||||
|
.dashboard-grid,
|
||||||
|
.workflow-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel-header {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.files-panel-meta {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
.dashboard-container {
|
||||||
|
padding: 4.5rem 1.25rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-panel,
|
||||||
|
.selection-card,
|
||||||
|
.files-panel {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workflow-grid {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
284
pages/index.vue
Normal file
284
pages/index.vue
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
<template>
|
||||||
|
<NuxtLayout name="default">
|
||||||
|
<div class="dashboard-container">
|
||||||
|
<header class="dashboard-header">
|
||||||
|
<div>
|
||||||
|
<h1 class="font-display text-3xl font-bold tracking-tight text-m-text">
|
||||||
|
Monitoring
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="content-grid">
|
||||||
|
<div class="content-main">
|
||||||
|
<section class="storage-section">
|
||||||
|
<div class="storage-section-header">
|
||||||
|
<h2 class="font-display text-xl font-semibold text-m-text">Stockage</h2>
|
||||||
|
<span class="font-mono text-[10px] uppercase tracking-widest text-m-muted">Volumes</span>
|
||||||
|
</div>
|
||||||
|
<div class="storage-grid">
|
||||||
|
<DiagramStorage
|
||||||
|
v-for="(item, idx) in diagramItems"
|
||||||
|
:key="item.key"
|
||||||
|
:item="item"
|
||||||
|
:style="{ animationDelay: `${idx * 150}ms` }"
|
||||||
|
class="animate-fade-in-up"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="dashboard-grid">
|
||||||
|
<div class="grid-left">
|
||||||
|
<StatusSite class="animate-fade-in-up" style="animation-delay: 100ms" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid-middle">
|
||||||
|
<Speedtest class="animate-fade-in-up speedtest-card-mobile" style="animation-delay: 150ms" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content-aside">
|
||||||
|
<MessageDiscord class="animate-fade-in-up" style="animation-delay: 300ms" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</NuxtLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
definePageMeta({layout: false})
|
||||||
|
import {computed, onMounted, ref} from "vue"
|
||||||
|
|
||||||
|
type DiskSourceResult = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
ok: boolean
|
||||||
|
output: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type DiskApiResponse = {
|
||||||
|
results: DiskSourceResult[]
|
||||||
|
}
|
||||||
|
|
||||||
|
type DiagramItem = {
|
||||||
|
key: string
|
||||||
|
loading: boolean
|
||||||
|
hostName: string
|
||||||
|
statusColorClass: string
|
||||||
|
chartRadius: number
|
||||||
|
chartCircumference: number
|
||||||
|
chartOffset: number
|
||||||
|
remainingPercentText: string
|
||||||
|
usedText: string
|
||||||
|
totalText: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectedBackup = ref<string | null>(null)
|
||||||
|
const rawResults = ref<DiskSourceResult[]>([])
|
||||||
|
const loading = ref(false)
|
||||||
|
const chartRadius = 52
|
||||||
|
const chartCircumference = 2 * Math.PI * chartRadius
|
||||||
|
|
||||||
|
const getHostName = (output: string, fallback: string) => {
|
||||||
|
const hostMatch = output.match(/Name:\s*(.+)/i)
|
||||||
|
return hostMatch?.[1]?.trim() || fallback
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDiskValues = (output: string) => {
|
||||||
|
if (!output || output.startsWith("Erreur:")) return null
|
||||||
|
|
||||||
|
const availableLine = output
|
||||||
|
.split("\n")
|
||||||
|
.find((line) => line.toLowerCase().includes("espace disponible"))
|
||||||
|
const usageLine = output
|
||||||
|
.split("\n")
|
||||||
|
.find((line) => line.toLowerCase().includes("espace utilise / espace total"))
|
||||||
|
|
||||||
|
const availableRaw = availableLine?.match(/:\s*(\d+(?:[.,]\d+)?)\s*GB/i)?.[1]
|
||||||
|
const usedRaw = usageLine?.match(/:\s*(\d+(?:[.,]\d+)?)\s*GB/i)?.[1]
|
||||||
|
const totalRaw = usageLine?.match(/\/\s*(\d+(?:[.,]\d+)?)\s*GB/i)?.[1]
|
||||||
|
|
||||||
|
const availableGb = availableRaw ? Number.parseFloat(availableRaw.replace(",", ".")) : null
|
||||||
|
const usedGb = usedRaw ? Number.parseFloat(usedRaw.replace(",", ".")) : null
|
||||||
|
const totalGb = totalRaw ? Number.parseFloat(totalRaw.replace(",", ".")) : null
|
||||||
|
|
||||||
|
if (
|
||||||
|
availableGb === null ||
|
||||||
|
usedGb === null ||
|
||||||
|
totalGb === null ||
|
||||||
|
!Number.isFinite(availableGb) ||
|
||||||
|
!Number.isFinite(usedGb) ||
|
||||||
|
!Number.isFinite(totalGb) ||
|
||||||
|
totalGb <= 0
|
||||||
|
) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return {availableGb, usedGb, totalGb}
|
||||||
|
}
|
||||||
|
|
||||||
|
const diagramItems = computed<DiagramItem[]>(() => {
|
||||||
|
return rawResults.value.map((result) => {
|
||||||
|
const diskValues = getDiskValues(result.output)
|
||||||
|
const remainingPercent =
|
||||||
|
diskValues === null
|
||||||
|
? null
|
||||||
|
: Math.max(
|
||||||
|
0,
|
||||||
|
Math.min(100, Math.round((diskValues.availableGb / diskValues.totalGb) * 100))
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
key: result.key,
|
||||||
|
loading: loading.value,
|
||||||
|
hostName: getHostName(result.output, result.label),
|
||||||
|
statusColorClass:
|
||||||
|
remainingPercent !== null && remainingPercent <= 30 ? "status-error" : "status-success",
|
||||||
|
chartRadius,
|
||||||
|
chartCircumference,
|
||||||
|
chartOffset: chartCircumference - ((remainingPercent ?? 0) / 100) * chartCircumference,
|
||||||
|
remainingPercentText:
|
||||||
|
loading.value ? "..." : remainingPercent === null ? "--%" : `${remainingPercent}%`,
|
||||||
|
usedText: loading.value ? "..." : diskValues ? `${diskValues.usedGb.toFixed(2)} GB` : "--",
|
||||||
|
totalText: loading.value ? "..." : diskValues ? `${diskValues.totalGb.toFixed(2)} GB` : "--"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const runScript = async () => {
|
||||||
|
loading.value = true
|
||||||
|
rawResults.value = []
|
||||||
|
|
||||||
|
try {
|
||||||
|
const output = await $fetch<DiskApiResponse>("/api/disk")
|
||||||
|
rawResults.value = output.results
|
||||||
|
} catch (error) {
|
||||||
|
const message = `Erreur: ${error instanceof Error ? error.message : String(error)}`
|
||||||
|
rawResults.value = [
|
||||||
|
{
|
||||||
|
key: "error",
|
||||||
|
label: "Source indisponible",
|
||||||
|
ok: false,
|
||||||
|
output: message
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
runScript()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dashboard-container {
|
||||||
|
padding: 2rem 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
padding-bottom: 1.5rem;
|
||||||
|
border-bottom: 1px solid rgba(80, 140, 255, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-section {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||||
|
gap: 1rem;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: rgb(var(--m-secondary));
|
||||||
|
padding: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) 320px;
|
||||||
|
gap: 1.5rem;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-main {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-aside {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 280px minmax(0, 1fr);
|
||||||
|
gap: 1.5rem;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-left,
|
||||||
|
.grid-middle,
|
||||||
|
.grid-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1180px) {
|
||||||
|
.content-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-aside {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
.dashboard-container {
|
||||||
|
padding: 4.5rem 1.25rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-header {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage-grid,
|
||||||
|
.content-grid,
|
||||||
|
.dashboard-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-selector {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backup-list-mobile {
|
||||||
|
order: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.speedtest-card-mobile {
|
||||||
|
order: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-aside {
|
||||||
|
grid-column: auto;
|
||||||
|
order: 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
User-Agent: *
|
||||||
|
Disallow:
|
||||||
18
server/api/backup-script.get.ts
Normal file
18
server/api/backup-script.get.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import scripts from "../config/backup-script.json"
|
||||||
|
|
||||||
|
type BackupScript = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
icon?: string
|
||||||
|
command: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineEventHandler(() => {
|
||||||
|
return {
|
||||||
|
scripts: (scripts as BackupScript[]).map(({ key, label, icon }) => ({
|
||||||
|
key,
|
||||||
|
label,
|
||||||
|
icon: icon || "mdi:play-circle-outline"
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
})
|
||||||
55
server/api/backup-script.post.ts
Normal file
55
server/api/backup-script.post.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import { exec } from "node:child_process"
|
||||||
|
import scripts from "../config/backup-script.json"
|
||||||
|
|
||||||
|
type BackupScript = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
command: string
|
||||||
|
}
|
||||||
|
|
||||||
|
function runCommand(command: string): Promise<string> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
exec(command, { timeout: 10 * 60 * 1000 }, (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject(stderr || error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resolve(stdout || stderr)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
const body = await readBody<{ key?: string }>(event)
|
||||||
|
const key = typeof body?.key === "string" ? body.key : null
|
||||||
|
|
||||||
|
if (!key) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 400,
|
||||||
|
statusMessage: "Clé de script manquante"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const script = (scripts as BackupScript[]).find((item) => item.key === key)
|
||||||
|
if (!script) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 404,
|
||||||
|
statusMessage: "Script introuvable"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const output = await runCommand(script.command)
|
||||||
|
return {
|
||||||
|
ok: true,
|
||||||
|
key: script.key,
|
||||||
|
label: script.label,
|
||||||
|
output: output.trim()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 500,
|
||||||
|
statusMessage: `Erreur execution script: ${String(error)}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
151
server/api/backups.get.ts
Normal file
151
server/api/backups.get.ts
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
import { execFile } from "node:child_process"
|
||||||
|
import folderMap from "../config/backup-folders.json"
|
||||||
|
|
||||||
|
const REMOTE_HOST = process.env.BACKUPS_REMOTE_HOST || "malio-b@192.168.0.179"
|
||||||
|
const REMOTE_ROOT = process.env.BACKUPS_REMOTE_ROOT || "/home/malio-b/backups"
|
||||||
|
const MAX_FILES_PER_FOLDER = Number(process.env.BACKUPS_MAX_FILES || "200")
|
||||||
|
const isSafeFolder = (value: string) => /^[a-zA-Z0-9._-]+$/.test(value)
|
||||||
|
const shellQuote = (value: string) => `'${value.replace(/'/g, `'\\''`)}'`
|
||||||
|
const FOLDER_MAP = folderMap as Record<string, string>
|
||||||
|
|
||||||
|
function runSsh(command: string): Promise<string> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
execFile(
|
||||||
|
"ssh",
|
||||||
|
["-o", "BatchMode=yes", "-o", "ConnectTimeout=5", REMOTE_HOST, command],
|
||||||
|
{ maxBuffer: 10 * 1024 * 1024 },
|
||||||
|
(error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject(stderr || error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resolve(stdout)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function isMissingPathError(error: unknown): boolean {
|
||||||
|
const message = String(error || "").toLowerCase()
|
||||||
|
return message.includes("no such file or directory") || message.includes("cannot access")
|
||||||
|
}
|
||||||
|
|
||||||
|
function toServerError(error: unknown) {
|
||||||
|
return createError({
|
||||||
|
statusCode: 500,
|
||||||
|
statusMessage: `Erreur SSH backups: ${String(error)}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseLines(output: string): string[] {
|
||||||
|
return output
|
||||||
|
.split("\n")
|
||||||
|
.map((line) => line.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
}
|
||||||
|
|
||||||
|
function quoteDir(pathValue: string) {
|
||||||
|
return shellQuote(pathValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function listRemoteFiles(remoteDir: string): Promise<string[]> {
|
||||||
|
const output = await runSsh(
|
||||||
|
`cd ${quoteDir(remoteDir)} && ls -1A | sort -r | head -n ${MAX_FILES_PER_FOLDER}`
|
||||||
|
)
|
||||||
|
return parseLines(output)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function listRemoteDirs(remoteRoot: string): Promise<string[]> {
|
||||||
|
const output = await runSsh(
|
||||||
|
`cd ${quoteDir(remoteRoot)} && for d in */; do [ -d "$d" ] && printf '%s\n' "\${d%/}"; done`
|
||||||
|
)
|
||||||
|
return parseLines(output)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getLatestRemoteFile(remoteDir: string): Promise<string | null> {
|
||||||
|
const output = await runSsh(
|
||||||
|
`cd ${quoteDir(remoteDir)} && ls -1A | sort -r | head -n 1`
|
||||||
|
)
|
||||||
|
const files = parseLines(output)
|
||||||
|
return files[0] || null
|
||||||
|
}
|
||||||
|
|
||||||
|
async function remoteDirExists(remoteDir: string): Promise<boolean> {
|
||||||
|
const output = await runSsh(`[ -d ${quoteDir(remoteDir)} ] && echo yes || echo no`)
|
||||||
|
return output.trim() === "yes"
|
||||||
|
}
|
||||||
|
|
||||||
|
async function resolveFolderRemoteDir(folderName: string): Promise<string | null> {
|
||||||
|
const mapped = FOLDER_MAP[folderName]
|
||||||
|
if (mapped) {
|
||||||
|
return `${REMOTE_ROOT}/${mapped}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const direct = `${REMOTE_ROOT}/${folderName}`
|
||||||
|
if (await remoteDirExists(direct)) {
|
||||||
|
return direct
|
||||||
|
}
|
||||||
|
|
||||||
|
const nested = `${REMOTE_ROOT}/bdd_recette/${folderName}`
|
||||||
|
if (await remoteDirExists(nested)) {
|
||||||
|
return nested
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
const { folder } = getQuery(event)
|
||||||
|
const folderName = typeof folder === "string" ? folder : null
|
||||||
|
|
||||||
|
// Si un dossier est demandé, on retourne sa liste de fichiers.
|
||||||
|
if (folderName) {
|
||||||
|
if (!isSafeFolder(folderName)) {
|
||||||
|
throw createError({
|
||||||
|
statusCode: 400,
|
||||||
|
statusMessage: "Paramètre folder invalide"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const remoteDir = await resolveFolderRemoteDir(folderName)
|
||||||
|
if (!remoteDir) return []
|
||||||
|
|
||||||
|
try {
|
||||||
|
return await listRemoteFiles(remoteDir)
|
||||||
|
} catch (error) {
|
||||||
|
if (isMissingPathError(error)) return []
|
||||||
|
throw toServerError(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sinon on récupère le dernier backup de chaque dossier distant.
|
||||||
|
let dirs: string[] = []
|
||||||
|
try {
|
||||||
|
dirs = await listRemoteDirs(REMOTE_ROOT)
|
||||||
|
} catch (error) {
|
||||||
|
throw toServerError(error)
|
||||||
|
}
|
||||||
|
|
||||||
|
const result: Array<{ folder: string; last: string | null }> = []
|
||||||
|
|
||||||
|
for (const dirName of dirs) {
|
||||||
|
const remoteDir = `${REMOTE_ROOT}/${dirName}`
|
||||||
|
try {
|
||||||
|
result.push({
|
||||||
|
folder: dirName,
|
||||||
|
last: await getLatestRemoteFile(remoteDir)
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
if (isMissingPathError(error)) {
|
||||||
|
result.push({
|
||||||
|
folder: dirName,
|
||||||
|
last: null
|
||||||
|
})
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
throw toServerError(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
})
|
||||||
15
server/api/discord/messages.get.ts
Normal file
15
server/api/discord/messages.get.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export default defineEventHandler(async () => {
|
||||||
|
const token = process.env.DISCORD_BOT_TOKEN
|
||||||
|
const channel = process.env.DISCORD_CHANNEL_ID
|
||||||
|
|
||||||
|
const messages = await $fetch(
|
||||||
|
`https://discord.com/api/v10/channels/${channel}/messages?limit=20`,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bot ${token}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
return messages
|
||||||
|
})
|
||||||
53
server/api/disk.get.ts
Normal file
53
server/api/disk.get.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import { exec } from "child_process"
|
||||||
|
import diskSources from "../config/disk-commands.json"
|
||||||
|
|
||||||
|
type DiskSource = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
command: string
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCommand(source: DiskSource) {
|
||||||
|
const envKey = `DISK_COMMAND_${source.key.toUpperCase()}`
|
||||||
|
const legacyEnvKey =
|
||||||
|
source.key === "remote" ? "DISK_REMOTE_COMMAND" : source.key === "local" ? "DISK_LOCAL_COMMAND" : ""
|
||||||
|
|
||||||
|
return process.env[envKey] || (legacyEnvKey ? process.env[legacyEnvKey] : undefined) || source.command
|
||||||
|
}
|
||||||
|
|
||||||
|
function runCommand(command: string): Promise<string> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
exec(command, (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject(stderr || error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resolve(stdout)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineEventHandler(async () => {
|
||||||
|
const results = await Promise.all(
|
||||||
|
(diskSources as DiskSource[]).map(async (source) => {
|
||||||
|
try {
|
||||||
|
const output = await runCommand(getCommand(source))
|
||||||
|
return {
|
||||||
|
key: source.key,
|
||||||
|
label: source.label,
|
||||||
|
ok: true,
|
||||||
|
output
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return {
|
||||||
|
key: source.key,
|
||||||
|
label: source.label,
|
||||||
|
ok: false,
|
||||||
|
output: `Erreur: ${String(error)}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
return { results }
|
||||||
|
})
|
||||||
131
server/api/download.get.ts
Normal file
131
server/api/download.get.ts
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
import { execFile, spawn } from "node:child_process"
|
||||||
|
import { Readable } from "node:stream"
|
||||||
|
import folderMap from "../config/backup-folders.json"
|
||||||
|
|
||||||
|
const REMOTE_HOST = process.env.BACKUPS_REMOTE_HOST || "malio-b@192.168.0.179"
|
||||||
|
const REMOTE_ROOT = process.env.BACKUPS_REMOTE_ROOT || "/home/malio-b/backups"
|
||||||
|
const FOLDER_MAP = folderMap as Record<string, string>
|
||||||
|
|
||||||
|
const isSafeFolder = (value: string) => /^[a-zA-Z0-9._-]+$/.test(value)
|
||||||
|
const isSafeFile = (value: string) => /^[^/\\]+$/.test(value)
|
||||||
|
const shellQuote = (value: string) => `'${value.replace(/'/g, `'\\''`)}'`
|
||||||
|
|
||||||
|
function runSsh(command: string): Promise<string> {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
execFile(
|
||||||
|
"ssh",
|
||||||
|
["-o", "BatchMode=yes", "-o", "ConnectTimeout=5", REMOTE_HOST, command],
|
||||||
|
{ maxBuffer: 10 * 1024 * 1024 },
|
||||||
|
(error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject(stderr || error.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resolve(stdout)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function remoteDirExists(remoteDir: string): Promise<boolean> {
|
||||||
|
const output = await runSsh(`[ -d ${shellQuote(remoteDir)} ] && echo yes || echo no`)
|
||||||
|
return output.trim() === "yes"
|
||||||
|
}
|
||||||
|
|
||||||
|
async function resolveFolderRemoteDir(folderName: string): Promise<string | null> {
|
||||||
|
const mapped = FOLDER_MAP[folderName]
|
||||||
|
if (mapped) {
|
||||||
|
return `${REMOTE_ROOT}/${mapped}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const direct = `${REMOTE_ROOT}/${folderName}`
|
||||||
|
if (await remoteDirExists(direct)) {
|
||||||
|
return direct
|
||||||
|
}
|
||||||
|
|
||||||
|
const nested = `${REMOTE_ROOT}/bdd_recette/${folderName}`
|
||||||
|
if (await remoteDirExists(nested)) {
|
||||||
|
return nested
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildContentDisposition(fileName: string) {
|
||||||
|
const asciiName = fileName.replace(/[^\x20-\x7E]/g, "_").replace(/["\\]/g, "_")
|
||||||
|
return `attachment; filename="${asciiName}"; filename*=UTF-8''${encodeURIComponent(fileName)}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function speedtestStream(event: any) {
|
||||||
|
const size = 128 * 1024 * 1024
|
||||||
|
let sent = 0
|
||||||
|
|
||||||
|
const stream = new Readable({
|
||||||
|
read(chunkSize) {
|
||||||
|
if (sent >= size) {
|
||||||
|
this.push(null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const remaining = size - sent
|
||||||
|
const chunk = Buffer.alloc(Math.min(chunkSize, remaining), "a")
|
||||||
|
sent += chunk.length
|
||||||
|
this.push(chunk)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
setHeader(event, "Content-Type", "application/octet-stream")
|
||||||
|
setHeader(event, "Content-Length", size)
|
||||||
|
return stream
|
||||||
|
}
|
||||||
|
|
||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
const { folder, file } = getQuery(event)
|
||||||
|
const folderName = typeof folder === "string" ? folder : null
|
||||||
|
const fileName = typeof file === "string" ? file : null
|
||||||
|
|
||||||
|
// Compat mode: utilisé par le test de débit.
|
||||||
|
if (!folderName || !fileName) {
|
||||||
|
return speedtestStream(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isSafeFolder(folderName) || !isSafeFile(fileName)) {
|
||||||
|
throw createError({ statusCode: 400, statusMessage: "Paramètres invalides" })
|
||||||
|
}
|
||||||
|
|
||||||
|
const remoteDir = await resolveFolderRemoteDir(folderName)
|
||||||
|
if (!remoteDir) {
|
||||||
|
throw createError({ statusCode: 404, statusMessage: "Dossier introuvable" })
|
||||||
|
}
|
||||||
|
|
||||||
|
const remotePath = `${remoteDir}/${fileName}`
|
||||||
|
const existsOutput = await runSsh(`[ -f ${shellQuote(remotePath)} ] && echo yes || echo no`)
|
||||||
|
if (existsOutput.trim() !== "yes") {
|
||||||
|
throw createError({ statusCode: 404, statusMessage: "Fichier introuvable" })
|
||||||
|
}
|
||||||
|
|
||||||
|
setHeader(event, "Content-Type", "application/octet-stream")
|
||||||
|
setHeader(event, "Content-Disposition", buildContentDisposition(fileName))
|
||||||
|
|
||||||
|
const child = spawn("ssh", [
|
||||||
|
"-o",
|
||||||
|
"BatchMode=yes",
|
||||||
|
"-o",
|
||||||
|
"ConnectTimeout=5",
|
||||||
|
REMOTE_HOST,
|
||||||
|
`cat ${shellQuote(remotePath)}`
|
||||||
|
])
|
||||||
|
|
||||||
|
let stderr = ""
|
||||||
|
child.stderr.on("data", (chunk) => {
|
||||||
|
stderr += chunk.toString()
|
||||||
|
})
|
||||||
|
|
||||||
|
child.on("close", (code) => {
|
||||||
|
if (code !== 0) {
|
||||||
|
console.error(`Erreur téléchargement SSH (${code}): ${stderr}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return sendStream(event, child.stdout)
|
||||||
|
})
|
||||||
3
server/api/ping.get.ts
Normal file
3
server/api/ping.get.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export default defineEventHandler(() => {
|
||||||
|
return { ok: true }
|
||||||
|
})
|
||||||
11
server/api/upload.post.ts
Normal file
11
server/api/upload.post.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
const req = event.node.req
|
||||||
|
|
||||||
|
let received = 0
|
||||||
|
|
||||||
|
for await (const chunk of req) {
|
||||||
|
received += chunk.length
|
||||||
|
}
|
||||||
|
|
||||||
|
return { received }
|
||||||
|
})
|
||||||
33
server/api/version-status.get.ts
Normal file
33
server/api/version-status.get.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import targets from "../config/version-status-targets.json"
|
||||||
|
|
||||||
|
export default defineEventHandler(async () => {
|
||||||
|
const results = await Promise.all(
|
||||||
|
targets.map(async (target) => {
|
||||||
|
try {
|
||||||
|
const response = await fetch(target.url, {
|
||||||
|
method: "GET",
|
||||||
|
headers: { Accept: "application/json" }
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
label: target.label,
|
||||||
|
url: target.url,
|
||||||
|
ok: response.status === 200,
|
||||||
|
status: response.status,
|
||||||
|
checkedAt: new Date().toISOString()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return {
|
||||||
|
label: target.label,
|
||||||
|
url: target.url,
|
||||||
|
ok: false,
|
||||||
|
status: 0,
|
||||||
|
checkedAt: new Date().toISOString(),
|
||||||
|
error: error instanceof Error ? error.message : String(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
return { results }
|
||||||
|
})
|
||||||
7
server/config/backup-folders.json
Normal file
7
server/config/backup-folders.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ferme": "bdd_recette/ferme",
|
||||||
|
"inventory": "bdd_recette/inventory",
|
||||||
|
"sirh": "bdd_recette/sirh",
|
||||||
|
"user": "bdd_recette/user",
|
||||||
|
"bitwarden": "bitwarden"
|
||||||
|
}
|
||||||
7
server/config/backup-options.json
Normal file
7
server/config/backup-options.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
{ "name": "bitwarden", "icon": "mdi:shield-key" },
|
||||||
|
{ "name": "inventory", "icon": "mdi:package-variant-closed" },
|
||||||
|
{ "name": "sirh", "icon": "mdi:account-group" },
|
||||||
|
{ "name": "ferme", "icon": "mdi:barn" },
|
||||||
|
{ "name": "user", "icon": "mdi:account" }
|
||||||
|
]
|
||||||
20
server/config/backup-script.json
Normal file
20
server/config/backup-script.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"key": "backup-bdd-recette",
|
||||||
|
"label": "Backup BDD recette",
|
||||||
|
"icon": "mdi:database-export",
|
||||||
|
"command": "ssh malio-b@192.168.0.179 'cd /home/malio-b/Malio-ops/RecetteScripts && bash backup-bdd-recette.sh && exit'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "check-statut-recette",
|
||||||
|
"label": "Check statut recette",
|
||||||
|
"icon": "mdi:server-network",
|
||||||
|
"command": "ssh malio-b@192.168.0.179 'cd /home/malio-b/Malio-ops/RecetteScripts && bash check-statut-recette.sh && exit'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "backup-vaultwarden",
|
||||||
|
"label": "Backup vaultwarden",
|
||||||
|
"icon": "mdi:data",
|
||||||
|
"command": "ssh malio-b@192.168.0.179 'cd /home/malio-b/Malio-ops/BackupVaultWarden && bash backup-vaultwarden.sh && exit'"
|
||||||
|
}
|
||||||
|
]
|
||||||
12
server/config/disk-commands.json
Normal file
12
server/config/disk-commands.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"key": "remote",
|
||||||
|
"label": "Serveur distant",
|
||||||
|
"command": "ssh malio-b@192.168.0.179 'cd /home/malio-b/Malio-ops/CheckStorage && bash check-storage.sh && exit'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "local",
|
||||||
|
"label": "Machine locale",
|
||||||
|
"command": "bash /home/kevin/check_storage.sh"
|
||||||
|
}
|
||||||
|
]
|
||||||
5
server/config/version-status-targets.json
Normal file
5
server/config/version-status-targets.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[
|
||||||
|
{ "label": "Ferme", "url": "http://ferme.malio-dev.fr/api/version" },
|
||||||
|
{ "label": "SIRH", "url": "http://sirh.malio-dev.fr/api/version" },
|
||||||
|
{ "label": "Inventory", "url": "http://inventory.malio-dev.fr/api/health" }
|
||||||
|
]
|
||||||
18
tsconfig.json
Normal file
18
tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
// https://nuxt.com/docs/guide/concepts/typescript
|
||||||
|
"files": [],
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "./.nuxt/tsconfig.app.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./.nuxt/tsconfig.server.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./.nuxt/tsconfig.shared.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./.nuxt/tsconfig.node.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user