Adds card for showing response times
This commit is contained in:
@@ -14,11 +14,11 @@ img {
|
||||
}
|
||||
`;
|
||||
|
||||
const ScreenshotCard = (screenshot: string): JSX.Element => {
|
||||
const ScreenshotCard = (screenshot: { data: string }): JSX.Element => {
|
||||
return (
|
||||
<Outer>
|
||||
<Heading as="h3" align="left" color={colors.primary}>Screenshot</Heading>
|
||||
<img src={screenshot} alt="Full page screenshot" />
|
||||
<img src={screenshot.data} alt="Full page screenshot" />
|
||||
</Outer>
|
||||
);
|
||||
}
|
||||
|
||||
29
src/components/Results/ServerStatus.tsx
Normal file
29
src/components/Results/ServerStatus.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
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)`
|
||||
span.val {
|
||||
&.up { color: ${colors.success}; }
|
||||
&.down { color: ${colors.danger}; }
|
||||
}
|
||||
`;
|
||||
|
||||
const ServerStatusCard = (serverStatus: any): JSX.Element => {
|
||||
return (
|
||||
<Outer>
|
||||
<Heading as="h3" align="left" color={colors.primary}>Server Status</Heading>
|
||||
<Row lbl="" val="">
|
||||
<span className="lbl">Is Up?</span>
|
||||
{ serverStatus.isUp ? <span className="val up">✅ Online</span> : <span className="val down">❌ Offline</span>}
|
||||
</Row>
|
||||
<Row lbl="Status Code" val={serverStatus.responseCode} />
|
||||
{ serverStatus.responseTime && <Row lbl="Response Time" val={`${Math.round(serverStatus.responseTime)}ms`} /> }
|
||||
</Outer>
|
||||
);
|
||||
}
|
||||
|
||||
export default ServerStatusCard;
|
||||
@@ -8,7 +8,6 @@ import Row from 'components/Form/Row';
|
||||
const Outer = styled(Card)``;
|
||||
|
||||
const TxtRecordCard = (records: any): JSX.Element => {
|
||||
console.log(records);
|
||||
return (
|
||||
<Outer>
|
||||
<Heading as="h3" align="left" color={colors.primary}>TXT Config</Heading>
|
||||
|
||||
Reference in New Issue
Block a user