Implements open port results into UI

This commit is contained in:
Alicia Sykes
2023-07-01 23:17:21 +01:00
parent 5e7c3d167f
commit a8981b8ca7
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,36 @@
import styled from 'styled-components';
import colors from 'styles/colors';
import Card from 'components/Form/Card';
import Heading from 'components/Form/Heading';
import Row from 'components/Form/Row';
const Outer = styled(Card)`
small {
margin-top: 1rem;
opacity: 0.5;
}
`;
const OpenPortsCard = (portData: any): JSX.Element => {
return (
<Outer>
<Heading as="h3" align="left" color={colors.primary}>Open Ports</Heading>
{portData.openPorts.map((port: any) => (
<Row key={port} lbl="" val="">
<span>{port}</span>
</Row>
)
)}
<br />
<small>
Unable to establish connections to:<br />
{portData.failedPorts.join(', ')}
</small>
</Outer>
);
}
export default OpenPortsCard;

View File

@ -144,6 +144,7 @@ const jobNames = [
'redirects',
'txt-records',
'status',
'ports',
// 'server-info',
'whois',
] as const;