blob: 8179c81a0a246fd734741494c33bfb32e996402f (
plain)
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
|
import React from "react";
import Button from "@mui/material/Button";
import Card from "@mui/material/Card";
import dateFormat from "dateformat";
import { resultClassName } from "../util";
function ListItem(props) {
return (
<tr
className="list-item"
variant="outlined"
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
paddingTop: "1em",
paddingBottom: "1em"
}}
onClick={() => {
if (window.getSelection().type !== "Range")
window.location = `/${props._id}`;
}}
>
<td>{dateFormat(props.timestamp, "isoUtcDateTime")}</td>
<td>
{props.ip}:{props.port}
</td>
<td>{props.domain}</td>
<td>{props.display_name}</td>
<td style={{ paddingRight: 0 }}>
<Card
className={resultClassName(props.result)}
variant="outlined"
>
{props.result.display_name}
</Card>
</td>
<td style={{ paddingLeft: 0 }}>
<Card className="reliability" variant="outlined">
{props.result.reliability}
</Card>
</td>
<td>
<Button variant="contained">Re-scan</Button>
</td>
</tr>
);
}
export default ListItem;
|