Files
web-check-2/src/components/Results/OpenPorts.tsx
2023-07-05 01:46:59 +01:00

28 lines
723 B
TypeScript

import { Card } from 'components/Form/Card';
import Row from 'components/Form/Row';
const cardStyles = `
small { margin-top: 1rem; opacity: 0.5; }
`;
const OpenPortsCard = (props: { data: any, title: string, actionButtons: any }): JSX.Element => {
const portData = props.data;
return (
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
{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>
</Card>
);
}
export default OpenPortsCard;