Spaces:
Running
Running
File size: 2,077 Bytes
5bdffe5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>NEXUS — ÉCOSYSTÈME APT</title>
<style>
body {
background: #0D1117;
color: #C8D6E5;
font-family: 'Courier New', monospace;
padding: 20px;
}
h1 {
color: #F5C842;
text-align: center;
font-size: 28px;
border-bottom: 2px solid #F5C842;
padding-bottom: 10px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
font-size: 12px;
}
th {
background: #1C2639;
color: #00D4FF;
text-align: left;
padding: 8px 12px;
border-bottom: 2px solid #00D4FF;
}
td {
padding: 6px 12px;
border-bottom: 1px solid #2A2A3A;
}
tr:hover {
background: #1C2639;
}
.size-bar {
display: inline-block;
height: 12px;
background: #F5C842;
border-radius: 4px;
margin-right: 8px;
}
.size-text {
color: #C8D6E5;
}
.total {
text-align: center;
margin-top: 30px;
padding: 15px;
background: #1C2639;
border-radius: 8px;
border: 1px solid #F5C842;
}
.total span {
color: #F5C842;
font-weight: bold;
}
</style>
</head>
<body>
<h1>🧬 NEXUS — ÉCOSYSTÈME APT</h1>
<div style="text-align:center;margin-bottom:20px;">
<span style="color:#6C7A94;">Paquets installés, versions, tailles — vue structurée</span>
</div>
<table>
<thead>
<tr>
<th>Paquet</th>
<th>Version</th>
<th>Taille (Ko)</th>
<th>Visualisation</th>
</tr>
</thead>
<tbody id="table-body">
</tbody>
</table>
<div class="total" id="total-info">
Chargement des données...
</div>
<script>
fetch('/apt_data')
.then(res => res.json())
.then(data => {
const tbody = document.getElementById('table-body');
let total = 0;
data.forEach(row => {
const size = parseInt(row.taille) || 0;
total += size;
const barWidth = Math.min((size / 5000) * 100, 100);
tbody.innerHTML += `
<tr>
<td>${row.paquet}</td>
<td>${row.version}</td>
<td>${size}</td>
<td>
<div class="size-bar" style="width:${barWidth}%;"></div>
<span class="size-text">${barWidth.toFixed(1)}%</span>
</td>
</tr>
`;
});
document.getElementById('total-info').innerHTML = `
📦 Total : <span>${data.length}</span> paquets ·
📊 Taille totale : <span>${(total / 1024).toFixed(2)} Mo</span>
`;
});
</script>
</body>
</html>
|