Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/small errors #5830

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/src/domain/objects/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export const domainType = new GraphQLObjectType({
ignoredCves: {
type: new GraphQLList(CveID),
description: 'List of CVEs that have been ignored by the user.',
resolve: ({ ignoredCves }) => ignoredCves,
resolve: ({ ignoredCves }) => ignoredCves || [],
},
dmarcSummaryByPeriod: {
description: 'Summarized DMARC aggregate reports.',
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/admin/AdminDomains.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ export function AdminDomains({ orgSlug, orgId }) {
)}
>
{({ id: domainId, domain, claimTags, archived, rcode, organizations, assetState }, index) => (
<>
<React.Fragment key={`admindomain-${index}`}>
{index === 0 && <Divider borderBottomColor="gray.400" />}
<Flex p="1" key={'admindomain' + index} align="center" rounded="md" mb="1">
<Flex p="1" align="center" rounded="md" mb="1">
<Stack direction="row" flexGrow="0" mr="2">
<IconButton
data-testid={`remove-${index}`}
Expand Down Expand Up @@ -372,7 +372,7 @@ export function AdminDomains({ orgSlug, orgId }) {
</ABTestWrapper>
</Flex>
<Divider borderBottomColor="gray.400" />
</>
</React.Fragment>
)}
</ListOf>
</>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/guidance/EmailGuidance.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function EmailGuidance({ dnsResults, dmarcPhase, status, mxRecordDiff })

return (
<Accordion allowMultiple defaultIndex={[0, 1, 2, 3, 4, 5]} w="100%">
<Text fontsize="lg">
<Text fontSize="lg">
<Trans>
<b>Last Scanned:</b> {formatTimestamp(timestamp)}
</Trans>
Expand Down Expand Up @@ -370,7 +370,7 @@ export function EmailGuidance({ dnsResults, dmarcPhase, status, mxRecordDiff })
: warning
return (
<Box key={idx} px="2">
<Text fontsize="lg">
<Text fontSize="lg">
<b>{idx + 1}.</b> {warningTranslated}
</Text>
</Box>
Expand Down Expand Up @@ -443,7 +443,7 @@ export function EmailGuidance({ dnsResults, dmarcPhase, status, mxRecordDiff })
{nsRecords.warnings.map((warning, idx) => {
return (
<Box key={idx} px="2">
<Text fontsize="lg">
<Text fontSize="lg">
<b>{idx + 1}.</b> {warning}
</Text>
</Box>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/guidance/GuidancePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,12 @@ function GuidancePage() {
</Text>
{organizations.edges.map(({ node }, idx) => {
return (
<>
<Link as={RouteLink} to={`/organizations/${node.slug}`} key={idx}>
<React.Fragment key={idx}>
<Link as={RouteLink} to={`/organizations/${node.slug}`}>
{node.name} ({node.acronym})
</Link>
{idx !== organizations.edges.length - 1 && <Text mr="1">,</Text>}
</>
</React.Fragment>
)
})}
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/guidance/WebGuidance.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function WebGuidance({ webResults, timestamp }) {
return (
<>
<Accordion allowMultiple defaultIndex={[0, 1, 2]}>
<Text fontsize="lg">
<Text fontSize="lg">
<Trans>
<b>Last Scanned:</b> {formatTimestamp(timestamp)}
</Trans>
Expand Down
28 changes: 12 additions & 16 deletions frontend/src/guidance/WebTLSResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,16 @@ export function WebTLSResults({ tlsResult }) {
<Trans>The following ciphers are from known weak protocols and must be disabled:</Trans>
</Text>
{weakProtocols?.map((protocol) => {
return (
<>
{rest[protocol]?.map(({ name }, idx) => {
return (
<Flex key={idx} {...cipherStyleProps}>
<Flex align="center" minW="50%">
<Text color="weak">{name}</Text>
</Flex>
<Text color="weak">{weakProtocolNames[protocol]}</Text>
</Flex>
)
})}
</>
)
return rest[protocol]?.map(({ name }, idx) => {
return (
<Flex key={`${protocol}-${idx}`} {...cipherStyleProps}>
<Flex align="center" minW="50%">
<Text color="weak">{name}</Text>
</Flex>
<Text color="weak">{weakProtocolNames[protocol]}</Text>
</Flex>
)
})
})}
</Box>
) : (
Expand Down Expand Up @@ -497,10 +493,10 @@ export function WebTLSResults({ tlsResult }) {
</Text>
{sanList.map((san, idx) => {
return (
<>
<React.Fragment key={idx}>
{san}
{idx < sanList.length - 1 && ', '}
</>
</React.Fragment>
)
})}
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/summaries/HistoricalSummariesGraph.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useState } from 'react'
import { Box, Flex, Select, Text } from '@chakra-ui/react'
import { number, object } from 'prop-types'
import { array, number } from 'prop-types'
import { extent, bisector } from 'd3-array'
import theme from '../theme/canada'

Expand Down Expand Up @@ -295,7 +295,7 @@ export function HistoricalSummariesGraph({ data, setRange, width = 1200, height
}

HistoricalSummariesGraph.propTypes = {
data: object.isRequired,
data: array.isRequired,
setRange: func,
width: number,
height: number,
Expand Down