Saatavuuskyselyt: IP/hostname, duplikaattien esto
- Reverse DNS -haku tallentaa hostnamen IP:n rinnalle (paljastaa operaattorin ja alueen, esim. dsl-hel-123.elisa.fi) - Duplikaattikyselyn (sama osoite+postinumero+kaupunki) ei tallenneta uudelleen samalle yritykselle - IP/hostname -sarake lisätty taulukkoon Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3520,7 +3520,7 @@ async function loadAvailabilityQueries(page = 0) {
|
||||
countEl.textContent = `Yhteensä ${data.total} kyselyä`;
|
||||
|
||||
if (data.queries.length === 0) {
|
||||
tbody.innerHTML = '<tr><td colspan="7" style="text-align:center;color:#888;padding:2rem;">Ei vielä kyselyjä</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="8" style="text-align:center;color:#888;padding:2rem;">Ei vielä kyselyjä</td></tr>';
|
||||
} else {
|
||||
tbody.innerHTML = data.queries.map(q => {
|
||||
const date = q.created_at ? q.created_at.replace('T', ' ').substring(0, 16) : '';
|
||||
@@ -3532,12 +3532,16 @@ async function loadAvailabilityQueries(page = 0) {
|
||||
if (q.referer) {
|
||||
try { source = new URL(q.referer).hostname; } catch(e) { source = q.referer.substring(0, 30); }
|
||||
}
|
||||
const ipInfo = q.hostname
|
||||
? `${esc(q.ip_address)}<br><small style="color:#aaa;">${esc(q.hostname)}</small>`
|
||||
: esc(q.ip_address || '');
|
||||
return `<tr>
|
||||
<td style="white-space:nowrap;">${esc(date)}</td>
|
||||
<td>${esc(q.osoite)}</td>
|
||||
<td>${esc(q.postinumero)}</td>
|
||||
<td>${esc(q.kaupunki)}</td>
|
||||
<td>${badge}</td>
|
||||
<td style="font-size:0.8rem;">${ipInfo}</td>
|
||||
<td style="font-size:0.8rem;color:#888;">${esc(source)}</td>
|
||||
<td style="font-size:0.8rem;color:#888;">${esc(q.company_nimi || q.company_id || '')}</td>
|
||||
</tr>`;
|
||||
|
||||
Reference in New Issue
Block a user