Skip to content

Commit

Permalink
fix: Remove log4j alert (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo authored Jan 27, 2022
1 parent 58d86c6 commit 57d096a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 35 deletions.
2 changes: 0 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@
"filterByAffectedSystems": "Filter by {count, plural, =-1 {affected systems} one {# system exposed } other {# systems exposed }}",
"hasKnownExploit": "Has a known exploit",
"high": "High",
"highVisibilityCve.body": "New CVE Alert: {synopsis} ({celebrityName}) does not have an associated errata with it for Red Hat Enterprise Linux as of now. For more details on this CVE, please visit the Red Hat Customer Portal page for this CVE",
"highVisibilityCve.link": "Open Red Hat Customer Portal page for {synopsis}",
"impactList.critical": "Critical",
"impactList.high": "High",
"impactList.important": "Important",
Expand Down
25 changes: 3 additions & 22 deletions src/Components/PresentationalComponents/EmptyStates/EmptyStates.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
EmptyStateIcon,
Text,
TextContent,
Title,
Alert
Title
} from '@patternfly/react-core';
import { ExternalLinkAltIcon, SecurityIcon } from '@patternfly/react-icons';
import messages from '../../../Messages';
Expand All @@ -20,7 +19,7 @@ import { LockIcon } from '@patternfly/react-icons';
import { intl } from '../../../Utilities/IntlProvider';
import PropTypes from 'prop-types';

export const EmptyStateNoCVEs = ({ secondParagraph, showHighVisibilityCveAlert }) => (
export const EmptyStateNoCVEs = ({ secondParagraph }) => (
<EmptyState variant={EmptyStateVariant.large}>
<Title headingLevel="h5" size="lg">
<FormattedMessage {...messages.emptyStateNoMatchingCves} />
Expand All @@ -37,31 +36,13 @@ export const EmptyStateNoCVEs = ({ secondParagraph, showHighVisibilityCveAlert }
</a>
) }} />
</Text>
{showHighVisibilityCveAlert && <Alert
className="high-visibility-cve pf-u-mt-lg"
variant="warning"
isInline
title={intl.formatMessage(messages.highVisibilityCveBody,
{ synopsis: 'CVE-2021-44228', celebrityName: 'Apache Log4j' })
}
actionLinks={
<a
href="https://access.redhat.com/security/cve/CVE-2021-44228"
target="__blank"
rel="noopener noreferrer"
>
{intl.formatMessage(messages.highVisibilityCveLink, { synopsis: 'CVE-2021-44228' })}
<ExternalLinkAltIcon className="pf-u-ml-xs"/>
</a>
}/>}
</EmptyStateBody>
</TextContent>
</EmptyState>
);

EmptyStateNoCVEs.propTypes = {
secondParagraph: PropTypes.object,
showHighVisibilityCveAlert: PropTypes.bool
secondParagraph: PropTypes.object
};

export const EmptyStateNoSystems = () => (
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SmartComponents/CVEs/CVEsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CVEsTableWithContext = ({ context, header, canEditStatusOrBusinessRisk })
cells: [
{
props: { colSpan: header?.length },
title: <EmptyStateNoCVEs showHighVisibilityCveAlert secondParagraph={
title: <EmptyStateNoCVEs secondParagraph={
context.params.affecting === 'true'
? messages.emptyStateYourSystemsShouldHaveCVEs
: messages.emptyStateThereShouldBeCVEs
Expand Down
10 changes: 0 additions & 10 deletions src/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1713,16 +1713,6 @@ export default defineMessages({
description: 'Button inside the column management modal, which will reset column selection to default',
defaultMessage: 'Reset to default'
},
highVisibilityCveBody: {
id: 'highVisibilityCve.body',
description: 'Alert inside CVE table empty state highlighting info about newest high visibility CVE',
defaultMessage: 'New CVE Alert: {synopsis} ({celebrityName}) does not have an associated errata with it for Red Hat Enterprise Linux as of now. For more details on this CVE, please visit the Red Hat Customer Portal page for this CVE'
},
highVisibilityCveLink: {
id: 'highVisibilityCve.link',
description: 'Alert inside CVE table empty state highlighting info about newest high visibility CVE',
defaultMessage: 'Open Red Hat Customer Portal page for {synopsis}'
},
noDescription: {
id: 'noDescription',
description: 'No description description',
Expand Down

0 comments on commit 57d096a

Please sign in to comment.