summaryrefslogtreecommitdiff
path: root/src/components/ListItem.js
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-03-30 12:53:34 +0200
committerErnst Widerberg <ernst@sunet.se>2022-03-30 12:54:32 +0200
commitdcd03d8a3f94505c53e667a4b967a29b698c5728 (patch)
tree399c39a193666d72e2fb9dcf0370ced04b1f96b0 /src/components/ListItem.js
parentcb77e7928297c39222a813b0de6f3b2768c24c61 (diff)
Merge redesign (refs/archive/redesign-2022-03-30)
Diffstat (limited to 'src/components/ListItem.js')
-rw-r--r--src/components/ListItem.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/components/ListItem.js b/src/components/ListItem.js
new file mode 100644
index 0000000..661f8c2
--- /dev/null
+++ b/src/components/ListItem.js
@@ -0,0 +1,41 @@
+import React from "react";
+
+import Card from "@mui/material/Card";
+
+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>{this.props.timestamp_in_utc}</td>
+ <td>
+ {this.props.ip}:{this.props.port}
+ </td>
+ <td>{this.props.domain}</td>
+ <td>{this.props.system_name}</td>
+ <td>
+ <Card
+ className={
+ "cve" + (this.props.vulnerable ? " vulnerable" : "")
+ }
+ variant="outlined"
+ >
+ {this.props.cve}
+ </Card>
+ </td>
+ </tr>
+ );
+ }
+}
+
+export default ListItem;