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