**Motivations:** - Complete documentation for dashboard, domains, ports and environment configuration - Add new services (ClamAV API, Watermark API) to the infrastructure - Enhance dashboard with new pages and improved functionality - Improve deployment scripts and service configurations **Root causes:** - Missing comprehensive documentation for infrastructure setup - Need for antivirus scanning service integration - Need for watermark service integration - Dashboard required additional pages and features **Correctifs:** - Added comprehensive documentation in docs/ (DASHBOARD.md, DOMAINS_AND_PORTS.md, ENVIRONMENT.md) - Updated systemd service files with proper environment variables - Enhanced nginx proxy configuration script - Updated maintenance documentation **Evolutions:** - Added new ClamAV API service (api-clamav) for file scanning - Added new Watermark API service (api-filigrane) for document watermarking - Enhanced signet-dashboard with new learn.html page - Improved dashboard UI with better styles and navigation - Enhanced app.js with new functionality and better error handling - Updated API documentation page with complete endpoint descriptions - Added deployment scripts for watermark and nginx configuration - Updated hash and UTXO lists with latest data - Enhanced server.js with new routes and improved Bitcoin RPC integration **Pages affectées:** - docs/DASHBOARD.md: New comprehensive dashboard documentation - docs/DOMAINS_AND_PORTS.md: New infrastructure domains and ports documentation - docs/ENVIRONMENT.md: New environment variables documentation - docs/MAINTENANCE.md: Updated maintenance procedures - docs/README.md: Updated main documentation - signet-dashboard/public/app.js: Enhanced with new features - signet-dashboard/public/styles.css: Improved styling - signet-dashboard/public/index.html: Enhanced main page - signet-dashboard/public/learn.html: New educational page - signet-dashboard/public/api-docs.html: Enhanced API documentation - signet-dashboard/public/hash-list.html: Updated hash list page - signet-dashboard/public/utxo-list.html: Updated UTXO list page - signet-dashboard/public/join-signet.html: Updated join signet page - signet-dashboard/src/server.js: Enhanced server with new routes - signet-dashboard/start.sh: Updated startup script - signet-dashboard/signet-dashboard.service: Updated systemd service - api-anchorage/anchorage-api.service: Updated systemd service - api-faucet/faucet-api.service: Updated systemd service - configure-nginx-proxy.sh: Enhanced nginx configuration script - add-watermark-certificate.sh: New watermark certificate script - deploy-watermark-nginx.sh: New deployment script - api-clamav/: New ClamAV API service - api-filigrane/: New Watermark API service - hash_list.txt, utxo_list.txt: Updated with latest data - anchor_count.txt: Updated anchor count
88 lines
4.7 KiB
Markdown
88 lines
4.7 KiB
Markdown
# Vérification des Options du Formulaire de Filigrane
|
|
|
|
## ✅ Options Vérifiées de Bout en Bout
|
|
|
|
### 1. **Texte libre du filigrane** (`watermark-text`)
|
|
- ✅ **HTML** : Champ texte présent (ligne 147)
|
|
- ✅ **Frontend JS** : Récupéré via `getElementById('watermark-text')` (ligne 733)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.text` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 207-209)
|
|
- ✅ **Certificat PDF** : Affiché si présent (ligne 124-125)
|
|
|
|
### 2. **Signature cryptographique** (`watermark-signature`)
|
|
- ✅ **HTML** : Champ texte présent (ligne 149-150)
|
|
- ✅ **Frontend JS** : Récupéré via `getElementById('watermark-signature')` (ligne 734)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.signature` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 211-213)
|
|
- ✅ **Certificat PDF** : Affiché si présent (ligne 127-128)
|
|
|
|
### 3. **Nom du dépositaire** (`watermark-depositor`)
|
|
- ✅ **HTML** : Champ texte présent (ligne 152-153)
|
|
- ✅ **Frontend JS** : Récupéré via `getElementById('watermark-depositor')` (ligne 735)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.depositor` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 215-217)
|
|
- ✅ **Certificat PDF** : Affiché si présent (ligne 121-122, 189)
|
|
|
|
### 4. **Nom de fichier du PDF filigrané** (`watermarked-filename`)
|
|
- ✅ **HTML** : Champ texte présent (ligne 155-156)
|
|
- ✅ **Frontend JS** : Récupéré via `getElementById('watermarked-filename')` (ligne 736)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.watermarkedFileName` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé pour nommer le fichier filigrané (ligne 354)
|
|
- ✅ **Retour API** : Inclus dans `watermarked.file.name` (ligne 375)
|
|
|
|
### 5. **Nom de fichier du document d'origine** (`original-filename`)
|
|
- ✅ **HTML** : Champ texte présent (ligne 158-159)
|
|
- ✅ **Frontend JS** : Récupéré via `getElementById('original-filename')` (ligne 737)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.originalFileName` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé pour nommer le fichier original (ligne 322, 327)
|
|
- ✅ **Retour API** : Inclus dans `original.file.name` (ligne 368)
|
|
|
|
### 6. **Date UTC** (`watermark-date-utc`)
|
|
- ✅ **HTML** : Case à cocher présente (ligne 163-164)
|
|
- ✅ **Frontend JS** : Récupéré via `.checked` (ligne 738)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.dateUTC` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 219-221)
|
|
- ✅ **Certificat PDF** : Affiché (ligne 184)
|
|
|
|
### 7. **Date locale** (`watermark-date-local`)
|
|
- ✅ **HTML** : Case à cocher présente (ligne 166-168)
|
|
- ✅ **Frontend JS** : Récupéré via `.checked` (ligne 739)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.dateLocal` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 223-225)
|
|
- ✅ **Certificat PDF** : Affiché (ligne 185)
|
|
|
|
### 8. **Numéro de bloc** (`watermark-block-number`)
|
|
- ✅ **HTML** : Case à cocher présente (ligne 170-172)
|
|
- ✅ **Frontend JS** : Récupéré via `.checked` (ligne 740)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.blockNumber` (ligne 552)
|
|
- ✅ **API Filigrane** :
|
|
- Déclenche la récupération des infos de bloc (ligne 298)
|
|
- Utilisé dans `addWatermarkToPDF()` (ligne 227-229)
|
|
- ✅ **Certificat PDF** : Affiché (ligne 186)
|
|
|
|
### 9. **Hash du bloc** (`watermark-block-hash`)
|
|
- ✅ **HTML** : Case à cocher présente (ligne 174-176)
|
|
- ✅ **Frontend JS** : Récupéré via `.checked` (ligne 741)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.blockHash` (ligne 552)
|
|
- ✅ **API Filigrane** :
|
|
- Déclenche la récupération des infos de bloc (ligne 298)
|
|
- Utilisé dans `addWatermarkToPDF()` (ligne 231-233)
|
|
- ✅ **Certificat PDF** : Affiché (ligne 187)
|
|
|
|
### 10. **Hash du document d'origine** (`watermark-document-hash`)
|
|
- ✅ **HTML** : Case à cocher présente (ligne 178-180)
|
|
- ✅ **Frontend JS** : Récupéré via `.checked` (ligne 742)
|
|
- ✅ **Backend Dashboard** : Reçu dans `watermarkOptions.documentHash` (ligne 552)
|
|
- ✅ **API Filigrane** : Utilisé dans `addWatermarkToPDF()` (ligne 235-239)
|
|
- ✅ **Certificat PDF** : Affiché (ligne 188)
|
|
|
|
## 🔧 Correction Appliquée
|
|
|
|
**Problème identifié** : Pour les fichiers uploadés (non texte), le champ `originalFileName` n'était pas utilisé.
|
|
|
|
**Correction** : Ligne 327 de `api-filigrane/src/routes/watermark.js` modifiée pour utiliser `watermarkOptions.originalFileName` si fourni, sinon `fileName`.
|
|
|
|
## ✅ Résultat
|
|
|
|
Toutes les options du formulaire sont implémentées de bout en bout et fonctionnent correctement.
|