**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
206 lines
7.7 KiB
HTML
206 lines
7.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Liste des Hash Ancrés - Bitcoin Ancrage Dashboard</title>
|
|
<link rel="stylesheet" href="styles.css">
|
|
<style>
|
|
.hash-list-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
.header-section {
|
|
margin-bottom: 30px;
|
|
}
|
|
.header-section h1 {
|
|
margin-bottom: 10px;
|
|
}
|
|
.header-section .back-link {
|
|
display: inline-block;
|
|
margin-bottom: 20px;
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
}
|
|
.header-section .back-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.info-section {
|
|
background: #f8f9fa;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.info-section p {
|
|
margin: 5px 0;
|
|
}
|
|
.table-container {
|
|
overflow-x: auto;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: white;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
th, td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
th {
|
|
background: #007bff;
|
|
color: white;
|
|
font-weight: bold;
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
tr:hover {
|
|
background: #f5f5f5;
|
|
}
|
|
.hash-cell {
|
|
font-family: monospace;
|
|
font-size: 0.9em;
|
|
word-break: break-all;
|
|
}
|
|
.txid-cell {
|
|
font-family: monospace;
|
|
font-size: 0.9em;
|
|
}
|
|
.txid-link {
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
}
|
|
.txid-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
font-size: 1.2em;
|
|
color: #666;
|
|
}
|
|
.error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin: 20px 0;
|
|
}
|
|
.refresh-button {
|
|
background: #28a745;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-size: 1em;
|
|
margin-top: 10px;
|
|
}
|
|
.refresh-button:hover {
|
|
background: #218838;
|
|
}
|
|
.refresh-button:disabled {
|
|
background: #6c757d;
|
|
cursor: not-allowed;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="hash-list-container">
|
|
<div class="header-section">
|
|
<a href="/" class="back-link">← Retour au dashboard</a>
|
|
<h1>Liste des Hash Ancrés</h1>
|
|
<div class="info-section">
|
|
<p><strong>Total de hash ancrés :</strong> <span id="hash-count">-</span></p>
|
|
<p><strong>Dernière mise à jour :</strong> <span id="last-update">-</span></p>
|
|
<button class="refresh-button" onclick="loadHashList()">Actualiser</button>
|
|
<a href="/api/hash/list.txt" download="hash_list.txt" style="margin-left: 10px; color: #007bff; text-decoration: none;">📥 Télécharger le fichier texte</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="content">
|
|
<div class="loading">Chargement des hash...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const API_BASE_URL = window.location.origin;
|
|
|
|
// Charger la liste au chargement de la page
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
loadHashList();
|
|
});
|
|
|
|
async function loadHashList() {
|
|
const contentDiv = document.getElementById('content');
|
|
const refreshButton = document.querySelector('.refresh-button');
|
|
|
|
refreshButton.disabled = true;
|
|
contentDiv.innerHTML = '<div class="loading">Chargement des hash...</div>';
|
|
|
|
try {
|
|
const response = await fetch(`${API_BASE_URL}/api/hash/list`);
|
|
|
|
if (!response.ok) {
|
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
}
|
|
|
|
const data = await response.json();
|
|
const hashes = data.hashes || [];
|
|
|
|
document.getElementById('hash-count').textContent = hashes.length.toLocaleString('fr-FR');
|
|
updateLastUpdateTime();
|
|
|
|
if (hashes.length === 0) {
|
|
contentDiv.innerHTML = '<div class="info-section"><p>Aucun hash ancré pour le moment.</p></div>';
|
|
} else {
|
|
let tableHTML = '<div class="table-container"><table><thead><tr>';
|
|
tableHTML += '<th>Hash</th>';
|
|
tableHTML += '<th>Transaction ID</th>';
|
|
tableHTML += '<th>Hauteur du Bloc</th>';
|
|
tableHTML += '<th>Confirmations</th>';
|
|
tableHTML += '</tr></thead><tbody>';
|
|
|
|
hashes.forEach((item) => {
|
|
const mempoolUrl = 'https://mempool.4nkweb.com/fr';
|
|
const txLink = `${mempoolUrl}/tx/${item.txid}`;
|
|
|
|
tableHTML += '<tr>';
|
|
tableHTML += `<td class="hash-cell">${item.hash}</td>`;
|
|
tableHTML += `<td class="txid-cell"><a href="${txLink}" target="_blank" rel="noopener noreferrer" class="txid-link">${item.txid}</a></td>`;
|
|
tableHTML += `<td>${item.blockHeight !== null ? item.blockHeight.toLocaleString('fr-FR') : '-'}</td>`;
|
|
tableHTML += `<td>${item.confirmations.toLocaleString('fr-FR')}</td>`;
|
|
tableHTML += '</tr>';
|
|
});
|
|
|
|
tableHTML += '</tbody></table></div>';
|
|
contentDiv.innerHTML = tableHTML;
|
|
}
|
|
} catch (error) {
|
|
console.error('Error loading hash list:', error);
|
|
contentDiv.innerHTML = `<div class="error">Erreur lors du chargement de la liste des hash : ${error.message}</div>`;
|
|
} finally {
|
|
refreshButton.disabled = false;
|
|
}
|
|
}
|
|
|
|
function updateLastUpdateTime() {
|
|
const now = new Date();
|
|
document.getElementById('last-update').textContent = now.toLocaleString('fr-FR');
|
|
}
|
|
</script>
|
|
<footer>
|
|
<p>Bitcoin Ancrage Dashboard - Équipe 4NK</p>
|
|
<a href="https://git.4nkweb.com/4nk/anchorage_layer_simple.git" target="_blank" rel="noopener noreferrer" class="git-link" title="Voir le code source sur Git">
|
|
<svg class="git-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
</svg>
|
|
</a>
|
|
</footer>
|
|
</body>
|
|
</html>
|