diff --git a/package-lock.json b/package-lock.json index 38e436627..a6c5051b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@redhat-cloud-services/frontend-components-pdf-generator": "2.6.7", "@redhat-cloud-services/frontend-components-translations": "3.2.3", "@redhat-cloud-services/frontend-components-utilities": "3.2.14", - "@redhat-cloud-services/vulnerabilities-client": "1.0.107", + "@redhat-cloud-services/vulnerabilities-client": "^1.0.108", "axios": "^0.27.2", "classnames": "^2.2.5", "dot": "^1.1.3", @@ -4246,9 +4246,9 @@ "integrity": "sha512-UgHgLf8LkqaD9PXjiVyYycMRlbvmVdJyoJfersCUwnzDMgp+DEoYlLQAa9kn/s4c1JvSt5MM+hEN+DRvwtCQGA==" }, "node_modules/@redhat-cloud-services/vulnerabilities-client": { - "version": "1.0.107", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/vulnerabilities-client/-/vulnerabilities-client-1.0.107.tgz", - "integrity": "sha512-H2FXP/Lm+xqthK0KYvNyB05I5mEN/V4qohl/99cp/QvOiduNu9NK8KwwoxyLQ/xt0tTMbOnFC/rMtSp/87kVSw==", + "version": "1.0.108", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/vulnerabilities-client/-/vulnerabilities-client-1.0.108.tgz", + "integrity": "sha512-co9sT6mXzx+gf0WCN8FULp8LCohqnGbrurHQuABVeoByXozO9U5VwrBATNdpr+Cm7vMsv5DwHtiP3hrlQqqhmw==", "dependencies": { "axios": "^0.21.1", "yaml": "^1.8.3" @@ -27825,9 +27825,9 @@ "integrity": "sha512-UgHgLf8LkqaD9PXjiVyYycMRlbvmVdJyoJfersCUwnzDMgp+DEoYlLQAa9kn/s4c1JvSt5MM+hEN+DRvwtCQGA==" }, "@redhat-cloud-services/vulnerabilities-client": { - "version": "1.0.107", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/vulnerabilities-client/-/vulnerabilities-client-1.0.107.tgz", - "integrity": "sha512-H2FXP/Lm+xqthK0KYvNyB05I5mEN/V4qohl/99cp/QvOiduNu9NK8KwwoxyLQ/xt0tTMbOnFC/rMtSp/87kVSw==", + "version": "1.0.108", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/vulnerabilities-client/-/vulnerabilities-client-1.0.108.tgz", + "integrity": "sha512-co9sT6mXzx+gf0WCN8FULp8LCohqnGbrurHQuABVeoByXozO9U5VwrBATNdpr+Cm7vMsv5DwHtiP3hrlQqqhmw==", "requires": { "axios": "^0.21.1", "yaml": "^1.8.3" diff --git a/package.json b/package.json index 2e19e0094..b3014f7a3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@redhat-cloud-services/frontend-components-pdf-generator": "2.6.7", "@redhat-cloud-services/frontend-components-translations": "3.2.3", "@redhat-cloud-services/frontend-components-utilities": "3.2.14", - "@redhat-cloud-services/vulnerabilities-client": "1.0.107", + "@redhat-cloud-services/vulnerabilities-client": "1.0.108", "axios": "^0.27.2", "classnames": "^2.2.5", "dot": "^1.1.3", diff --git a/src/Helpers/APIHelper.js b/src/Helpers/APIHelper.js index 4e66998c7..8b1bebf67 100644 --- a/src/Helpers/APIHelper.js +++ b/src/Helpers/APIHelper.js @@ -50,8 +50,8 @@ export function getExecutiveReport() { } /** - * /cves - * /cves/ids + * /vulnerabilities/cves + * /vulnerabilities/cves/ids */ let cveParams = [ 'cvss_from', @@ -76,7 +76,9 @@ export function getCveListByAccount(apiProps) { ...defaultParams, ...cveParams, 'report', - 'advanced_report' + 'advanced_report', + 'ansible', + 'mssql' ]; let parameterArray = constructParameters(apiProps, parameterNames); let result = api.getCveList(...parameterArray); @@ -86,7 +88,9 @@ export function getCveListByAccount(apiProps) { export function getCveIdsList(apiProps) { let parameterNames = [ ...defaultParams, - ...cveParams + ...cveParams, + 'ansible', + 'mssql' ]; let parameterArray = constructParameters(apiProps, parameterNames); @@ -95,8 +99,7 @@ export function getCveIdsList(apiProps) { } /** - * /cve/ID/affected_systems - * /cve/ID/affected_systems/ids + * /cves/ID/affected_systems */ let systemsByCVEparams = [ 'status_id', @@ -121,7 +124,9 @@ export function getAffectedSystemsByCVE({ id, ...apiProps }) { let parameterNames = [ ...defaultParams, ...systemsByCVEparams, - 'report' + 'report', + 'ansible', + 'mssql' ]; let parameterArray = constructParameters(apiProps, parameterNames); @@ -141,8 +146,8 @@ export function getAffectedSystemsIdsByCve({ id, ...apiProps }) { } /** - * /system/ID/cves - * /system/ID/cves/ids + * /systems/ID/cves + * /systems/ID/cves/ids */ let cveBySystemParams = [ 'cvss_from', @@ -219,7 +224,9 @@ export function getSystems(apiProps) { let parameterNames = [ ...defaultParams, ...systemsParams, - 'report' + 'report', + 'ansible', + 'mssql' ]; let parameterArray = constructParameters(apiProps, parameterNames); let result = api.getSystemsList(...parameterArray); @@ -245,7 +252,9 @@ export function getDashbar(apiProps) { let parameterNames = [ 'tags', 'sap_sids', - 'sap_system' + 'sap_system', + 'ansible', + 'mssql' ]; let parameterArray = constructParameters(apiProps, parameterNames); let result = api.getDashbar(...parameterArray); diff --git a/src/Helpers/constants.js b/src/Helpers/constants.js index 47d4bd039..df9365cc9 100644 --- a/src/Helpers/constants.js +++ b/src/Helpers/constants.js @@ -870,7 +870,9 @@ export const CVES_ALLOWED_PARAMS = [ 'tags', 'sap_sids', 'sap_system', - 'remediation' + 'remediation', + 'ansible', + 'mssql' ]; export const SYSTEMS_EXPOSED_ALLOWED_PARAMS = [ @@ -891,7 +893,9 @@ export const SYSTEMS_EXPOSED_ALLOWED_PARAMS = [ 'advisory', 'rhel_version', 'advisory_available', - 'remediation' + 'remediation', + 'ansible', + 'mssql' ]; export const SYSTEMS_ALLOWED_PARAMS = [ @@ -904,7 +908,9 @@ export const SYSTEMS_ALLOWED_PARAMS = [ 'sap_sids', 'sap_system', 'excluded', - 'rhel_version' + 'rhel_version', + 'ansible', + 'mssql' ]; export const CVES_DEFAULT_FILTERS = { diff --git a/src/Store/Reducers/reducersHelper.js b/src/Store/Reducers/reducersHelper.js index cc7c84511..21baa6257 100644 --- a/src/Store/Reducers/reducersHelper.js +++ b/src/Store/Reducers/reducersHelper.js @@ -30,7 +30,11 @@ export const applyGlobalFilter = (state, { workloads, SIDs, tags }) => { } else { state = { ...state, - ...workloads && { sap_system: workloads?.SAP?.isSelected === true ? true : undefined }, + ...workloads && { + sap_system: (workloads?.SAP?.isSelected === true) || undefined, + ansible: (workloads?.['Ansible Automation Platform']?.isSelected === true) || undefined, + mssql: (workloads?.['Microsoft SQL']?.isSelected === true) || undefined + }, ...SIDs && { sap_sids: SIDs }, ...tags && { tags }, page: 1