Highlight things related to ID

This commit is contained in:
Kuba Orlik 2021-11-07 17:51:30 +01:00
parent 0960006a5a
commit 773d14d2da
2 changed files with 19 additions and 2 deletions

View File

@ -26,13 +26,24 @@ function Report() {
</thead> </thead>
<tbody> <tbody>
{marked_entries.map((entry) => ( {marked_entries.map((entry) => (
<tr> <tr
style={{
backgroundColor:
entry.classification == "id" ? "yellow" : "white",
}}
>
<td>{entry.request.shorthost}</td> <td>{entry.request.shorthost}</td>
<td style={{ overflowWrap: "anywhere" }}> <td style={{ overflowWrap: "anywhere" }}>
{entry.source}:{entry.name} {entry.source}:{entry.name}
{entry.markedKeys.join(",")} {entry.markedKeys.join(",")}
</td> </td>
<td style={{ width: "400px", overflowWrap: "anywhere" }}> <td
style={{
width: "400px",
overflowWrap: "anywhere",
backgroundColor: entry.isRelatedToID() ? "yellow" : "white",
}}
>
{entry.value} {entry.value}
</td> </td>
<td> <td>

View File

@ -133,6 +133,12 @@ export class StolenDataEntry {
return "id"; return "id";
} }
} }
isRelatedToID() {
return this.request.stolenData.some(
(entry) => (entry.classification = "id")
);
}
} }
export class MergedStolenDataEntry { export class MergedStolenDataEntry {