2021-11-08 20:14:28 +01:00
|
|
|
import React from "react";
|
|
|
|
import { RequestCluster } from "../request-cluster";
|
|
|
|
import { Classifications, Sources } from "../stolen-data-entry";
|
|
|
|
|
|
|
|
const emailClassifications: Record<keyof typeof Classifications, string> = {
|
|
|
|
id: "sztucznie nadane mi ID",
|
|
|
|
history: "część mojej historii przeglądania",
|
2021-11-11 20:25:06 +01:00
|
|
|
location: "informacje na temat mojej lokalizacji geograficznej",
|
2021-11-08 20:14:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const emailSources: Record<Sources, string> = {
|
|
|
|
header: "w nagłówku HTTP",
|
|
|
|
cookie: "z pliku Cookie",
|
|
|
|
pathname: "jako części adresu URL",
|
|
|
|
queryparams: "jako część adresu URL (query-params)",
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function DomainSummary({
|
|
|
|
cluster,
|
|
|
|
}: {
|
|
|
|
cluster: RequestCluster;
|
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<li>
|
|
|
|
Właściciel domeny <strong>{cluster.id}</strong> otrzymał:{" "}
|
|
|
|
<ul>
|
2021-11-09 17:47:42 +01:00
|
|
|
<li>Mój adres IP</li>
|
2021-11-22 18:56:36 +01:00
|
|
|
{cluster
|
|
|
|
.getRepresentativeStolenData()
|
|
|
|
.filter((entry) => entry.isMarked)
|
|
|
|
.map((entry) => (
|
|
|
|
<li>
|
|
|
|
{emailClassifications[entry.classification]}{" "}
|
|
|
|
{emailSources[entry.source]} (nazwa: <code>{entry.name}</code>,{" "}
|
|
|
|
wartość: <code>{entry.getValuePreview()}</code>)
|
|
|
|
</li>
|
|
|
|
))}
|
2021-11-08 20:14:28 +01:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
);
|
|
|
|
}
|