Skip to content

Commit

Permalink
Update empty state
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo committed Jul 7, 2023
1 parent de6ffbc commit fb92a69
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"CVEsReport.subheaderExploit": "Of the identified CVEs, <b>{knownExploitCount, plural, one {# CVE} other {# CVEs}}</b> {knownExploitCount, plural, one {has} other {have}} a known exploit.",
"actions": "Actions",
"advisory": "Advisory",
"advisoryColumnTooltip": "CVEs with the Security rule label will appear in this list regardless of whether or not an advisory is available. For standard CVEs, advisories may not exist for all major/minor versions of RHEL. Click on the CVE to determine which OS versions have supported advisories.",
"advisoryName": "Advisory name",
"advisoryTooltip": "An advisory is not available. For more information, view this CVE in the {link}",
"affectsSystems": "Systems",
Expand Down Expand Up @@ -110,7 +111,8 @@
"emptyState.notConnected.buttonText": "Learn how to activate the Insights client",
"emptyState.notConnected.titleText": "This system isn’t connected to Insights yet",
"emptyState.prodSecLink": "Red Hat Product Security",
"emptyState.thereShouldBeCVE": "As of today, Insights Vulnerability shows CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}",
"emptyState.thereShouldBeCVE": "Currently, you are only viewing CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please adjust your settings and search again. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}",
"emptyState.thereShouldBeCVE.noErrata": "Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}",
"emptyState.thisSystemShouldHaveCVEs": "If you think this system has applicable CVEs or would like more information, contact {prodSecLink}.",
"emptyStateSystem.enableAnalysis": "Enable Vulnerability analysis",
"emptyStateSystemDisabled.body": "Vulnerability analysis on this system has been disabled. It is not being evaluated for potential vulnerabilities by Red Hat Insights.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ exports[`Empty states should render EmptyStateNoCVEs 1`] = `
<EmptyStateNoCVEs
secondParagraph={
{
"defaultMessage": "As of today, Insights Vulnerability shows CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}",
"defaultMessage": "Currently, you are only viewing CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please adjust your settings and search again. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}",
"description": "Paragraph for empty state component advising to contact support when there is a problem",
"id": "emptyState.thereShouldBeCVE",
}
Expand Down Expand Up @@ -238,7 +238,7 @@ exports[`Empty states should render EmptyStateNoCVEs 1`] = `
data-pf-content={true}
>
<FormattedMessage
defaultMessage="As of today, Insights Vulnerability shows CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}"
defaultMessage="Currently, you are only viewing CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please adjust your settings and search again. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}"
description="Paragraph for empty state component advising to contact support when there is a problem"
id="emptyState.thereShouldBeCVE"
values={
Expand Down Expand Up @@ -280,7 +280,7 @@ exports[`Empty states should render EmptyStateNoCVEs 1`] = `
}
}
>
As of today, Insights Vulnerability shows CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please check the
Currently, you are only viewing CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please adjust your settings and search again. Please check the
<a
href="https://access.redhat.com/security/security-updates/#/cve"
key=".$.1"
Expand Down
9 changes: 8 additions & 1 deletion src/Components/SmartComponents/CVEs/CVEsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ const CVEsTableWithContext = ({ context, header, canEditStatusOrBusinessRisk })
cells: [
{
props: { colSpan: header?.length },
title: <EmptyStateNoCVEs secondParagraph={messages.emptyStateThereShouldBeCVEs} />
title:
<EmptyStateNoCVEs
secondParagraph={
context.cves.meta.cves_without_errata
? messages.emptyStateThereShouldBeCVEsNoErrata
: messages.emptyStateThereShouldBeCVEs
}
/>
}
]
}]);
Expand Down
7 changes: 6 additions & 1 deletion src/Messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,12 @@ export default defineMessages({
emptyStateThereShouldBeCVEs: {
id: 'emptyState.thereShouldBeCVE',
description: 'Paragraph for empty state component advising to contact support when there is a problem',
defaultMessage: 'As of today, Insights Vulnerability shows CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}'
defaultMessage: 'Currently, you are only viewing CVEs with Errata. It is possible the CVE you are searching for does not yet have an associated Errata. Please adjust your settings and search again. Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}'
},
emptyStateThereShouldBeCVEsNoErrata: {
id: 'emptyState.thereShouldBeCVE.noErrata',
description: 'Paragraph for empty state component advising to contact support when there is a problem',
defaultMessage: 'Please check the {cveDatabaseLink} or if you would like more information, contact {prodSecLink}'
},
emptyStateThisSystemShouldHaveCVEs: {
id: 'emptyState.thisSystemShouldHaveCVEs',
Expand Down

0 comments on commit fb92a69

Please sign in to comment.