From dcd03d8a3f94505c53e667a4b967a29b698c5728 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Wed, 30 Mar 2022 12:53:34 +0200 Subject: Merge redesign (refs/archive/redesign-2022-03-30) --- src/components/ScanDetail.js | 118 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 src/components/ScanDetail.js (limited to 'src/components/ScanDetail.js') diff --git a/src/components/ScanDetail.js b/src/components/ScanDetail.js new file mode 100644 index 0000000..a5f6d16 --- /dev/null +++ b/src/components/ScanDetail.js @@ -0,0 +1,118 @@ +import React from "react"; + +import Alert from "@mui/material/Alert"; +import Card from "@mui/material/Card"; + +class ScanDetail extends React.Component { + render() { + return ( + +
+ #{this.props._id} +
+

General info

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Domain{this.props.domain}
Endpoint{`${this.props.ip}:${this.props.port}`}
Hostname{this.props.ptr}
Owner{this.props.whois_description}
ASN{`${this.props.asn} (${this.props.asn_country_code})`}
Abuse mail{this.props.abuse_mail}
+ + {this.props.user_presentation.description && ( + <> +
+ + {this.props.user_presentation.description} + + + )} + +

Custom info

+
+ +

Latest scan | {this.props.timestamp_in_utc}

+
+ {this.props.result + .sort((a, b) => (a.vulnerable ? -1 : 1)) + .map(cve => ( + + ))} +
+ + ); + } +} + +function Details(props) { + return ( + <> + + + ); +} + +function UserPresentation(props) { + return ( + + {Object.entries(props.data).map( + ([key, { data, display_name, description }]) => ( + + ) + )} +
+ ); +} + +function UserPresentationElement(props) { + return ( + + {props.display_name} + {props.data.toString()} + {props.description} + + ); +} + +function CVE(props) { + return ( + + {props.cve} + + ); +} + +export default ScanDetail; -- cgit v1.1