feat(dashboard): afficher SETTINGS H2 individuels dans la table mismatch
- /api/browser-signatures : top_mismatches inclut désormais les 7 colonnes SETTINGS individuelles (h2_header_table_size, h2_enable_push, h2_max_concurrent_streams, h2_initial_window_size, h2_max_frame_size, h2_max_header_list_size, h2_enable_connect_protocol) - stats : ajout sessions_with_priority (countIf h2_priority_present > 0) - browsers.html : colonne SETTINGS compact dans la table suspects (format '3:100, 4:65536, 2:0' — IDs Akamai avec valeurs non-nulles) - Compteur pseudo-priority utilise la vraie valeur sessions_with_priority au lieu d'afficher '—' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -156,6 +156,7 @@
|
||||
<th class="px-3 py-2 font-medium">IP</th>
|
||||
<th class="px-3 py-2 font-medium">JA4 famille</th>
|
||||
<th class="px-3 py-2 font-medium">H2 famille</th>
|
||||
<th class="px-3 py-2 font-medium">SETTINGS</th>
|
||||
<th class="px-3 py-2 font-medium">WU value</th>
|
||||
<th class="px-3 py-2 font-medium">Pseudo-order</th>
|
||||
<th class="px-3 py-2 font-medium text-right">Hits</th>
|
||||
@ -163,7 +164,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbl-suspects-body" class="divide-y divide-gray-800/50">
|
||||
<tr><td colspan="7" class="px-3 py-6 text-center text-gray-600">Chargement…</td></tr>
|
||||
<tr><td colspan="8" class="px-3 py-6 text-center text-gray-600">Chargement…</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -525,8 +526,8 @@ async function loadBrowserData() {
|
||||
setText('pseudo-chromesafari', fmt(chrome + safari));
|
||||
setText('pseudo-firefox', fmt(firefox));
|
||||
setText('pseudo-other', fmt(other));
|
||||
// Pour h2_priority_present on n'a pas le chiffre direct — afficher N/A
|
||||
setText('pseudo-priority', '—');
|
||||
// Pour h2_priority_present on utilise le compteur direct de l'API
|
||||
setText('pseudo-priority', fmt(s.sessions_with_priority));
|
||||
}
|
||||
|
||||
// ─── Graphiques ──────────────────────────────────────────────────────────
|
||||
@ -605,7 +606,7 @@ function renderMismatchBar(rows) {
|
||||
function renderSuspects(rows) {
|
||||
const tbody = document.getElementById('tbl-suspects-body');
|
||||
if (!rows.length) {
|
||||
tbody.innerHTML = '<tr><td colspan="7" class="px-3 py-6 text-center text-gray-600">Aucun mismatch détecté dans les 24 dernières heures</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" class="px-3 py-6 text-center text-gray-600">Aucun mismatch détecté dans les 24 dernières heures</td></tr>';
|
||||
return;
|
||||
}
|
||||
const WU_LABELS = {
|
||||
@ -615,6 +616,23 @@ function renderSuspects(rows) {
|
||||
1073676289: '<span class="text-gray-400">go net/http</span>',
|
||||
0: '<span class="text-red-400">absent</span>',
|
||||
};
|
||||
// Noms courts des paramètres SETTINGS (ID → label)
|
||||
const SETTINGS_NAMES = {
|
||||
h2_header_table_size: '1',
|
||||
h2_enable_push: '2',
|
||||
h2_max_concurrent_streams: '3',
|
||||
h2_initial_window_size: '4',
|
||||
h2_max_frame_size: '5',
|
||||
h2_max_header_list_size: '6',
|
||||
h2_enable_connect_protocol: '8',
|
||||
};
|
||||
function fmtSettings(r) {
|
||||
const pairs = Object.entries(SETTINGS_NAMES)
|
||||
.filter(([col]) => r[col] != null && r[col] !== -1)
|
||||
.map(([col, id]) => `${id}:${r[col]}`);
|
||||
if (!pairs.length) return '<span class="text-gray-600">—</span>';
|
||||
return `<span class="font-mono text-[10px] text-emerald-300">${escHtml(pairs.join(', '))}</span>`;
|
||||
}
|
||||
tbody.innerHTML = rows.map(r => {
|
||||
const wuLabel = WU_LABELS[r.wu_value] || `<span class="text-gray-400">${r.wu_value}</span>`;
|
||||
const coh = r.coherence != null ? r.coherence.toFixed(2) : '—';
|
||||
@ -624,6 +642,7 @@ function renderSuspects(rows) {
|
||||
<td class="px-3 py-2 font-mono text-indigo-300"><a href="/ip/${r.ip}" class="hover:underline">${r.ip}</a></td>
|
||||
<td class="px-3 py-2 text-gray-300">${r.ja4_family || '—'}</td>
|
||||
<td class="px-3 py-2 text-amber-300">${h2fam}</td>
|
||||
<td class="px-3 py-2">${fmtSettings(r)}</td>
|
||||
<td class="px-3 py-2">${wuLabel}</td>
|
||||
<td class="px-3 py-2 font-mono text-gray-400">${r.pseudo_order || '—'}</td>
|
||||
<td class="px-3 py-2 text-right text-gray-300">${fmt(r.hits)}</td>
|
||||
|
||||
Reference in New Issue
Block a user