Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo committed Jun 30, 2023
1 parent 62d287c commit 9db31d2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@redhat-cloud-services/frontend-components-translations": "^3.2.4",
"@redhat-cloud-services/frontend-components-utilities": "^3.7.0",
"@redhat-cloud-services/host-inventory-client": "^1.0.116",
"@redhat-cloud-services/vulnerabilities-client": "^1.2.4",
"@redhat-cloud-services/vulnerabilities-client": "^1.2.5",
"@scalprum/react-core": "^0.1.9",
"axios": "^1.4.0",
"dot": "^1.1.3",
Expand Down
3 changes: 2 additions & 1 deletion src/Components/SmartComponents/Modals/ReportConfigModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const ReportConfigModal = ({
'business_risk_id',
'status_id',
'publish_date',
'rhel_version'
'rhel_version',
'advisory_available'
];

const handleCheckboxChange = (parameter, value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const SystemsExposedTable = ({
}}
canEditPairStatus={canEditPairStatus}
canExport={canExport}
showingCvesWithoutErrata={meta?.cves_without_errata}
>
{StatusModal && <StatusModal/>}

Expand Down
9 changes: 8 additions & 1 deletion src/Helpers/ReportsHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
RULE_PRESENCE_OPTIONS,
DEFAULT_FILTER_DATA,
PDF_REPORT_PER_PAGE,
KNOWN_EXPLOIT_FILTER_OPTIONS
KNOWN_EXPLOIT_FILTER_OPTIONS,
ADVISORY_AVAILABILITY_FILTER_OPTIONS
} from './constants';
import { formatDate } from './MiscHelper';
import { intl } from '../Utilities/IntlProvider';
Expand Down Expand Up @@ -61,6 +62,12 @@ export const buildFilters = filterData => {
newValues[key].values = value.map(version => `RHEL ${version}`).join(', ');
break;

case 'advisory_available':
newValues[key].values = value.map(
checkedValue => ADVISORY_AVAILABILITY_FILTER_OPTIONS.find(({ value }) => value === checkedValue).label
).join(', ');
break;

case 'tags':
newValues[key].values = value;
break;
Expand Down
6 changes: 6 additions & 0 deletions src/Helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ export const CVE_REPORT_FILTERS = {
selectProps: { style: { maxHeight: '250px', overflow: 'auto' } },
allSelectedText: intl.formatMessage(messages.optionsAny)
},
advisory_available: {
title: intl.formatMessage(messages.advisory),
items: ADVISORY_AVAILABILITY_FILTER_OPTIONS,
component: CheckboxCustomFilter
},
tags: {
title: 'Tags',
component: TagFilter,
Expand Down Expand Up @@ -876,6 +881,7 @@ export const DEFAULT_FILTER_DATA = {
},
known_exploit: [],
rhel_version: [],
advisory_available: [],
tags: []
};

Expand Down

0 comments on commit 9db31d2

Please sign in to comment.