This commit is contained in:
parent
55db8f7dd5
commit
c1df5aaaff
@ -155,7 +155,8 @@
|
||||
"low": "Low",
|
||||
"lowShort": "L",
|
||||
"unknown": "Unknown",
|
||||
"unknownShort": "U"
|
||||
"unknownShort": "U",
|
||||
"no": "No"
|
||||
},
|
||||
"vulnerabilityPackageSection": {
|
||||
"packagePath": "Package Path",
|
||||
|
@ -155,7 +155,8 @@
|
||||
"low": "Небольших",
|
||||
"lowShort": "Н",
|
||||
"unknown": "Неизвестных",
|
||||
"unknownShort": "Не"
|
||||
"unknownShort": "Не",
|
||||
"no": "Нет"
|
||||
},
|
||||
"vulnerabilityPackageSection": {
|
||||
"packagePath": "Путь пакета",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { isEmpty } from 'lodash';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
NoneVulnerabilityIcon,
|
||||
LowVulnerabilityIcon,
|
||||
@ -35,9 +36,33 @@ const getAllAuthorsOfSignatures = (signatureInfo) => {
|
||||
|
||||
const VulnerabilityIconCheck = ({ vulnerabilitySeverity }) => {
|
||||
let result;
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
let vulnerabilityStringTitle = '';
|
||||
if (vulnerabilitySeverity) {
|
||||
vulnerabilityStringTitle = vulnerabilitySeverity.charAt(0) + vulnerabilitySeverity.substring(1).toLowerCase();
|
||||
switch (vulnerabilityStringTitle) {
|
||||
case 'None':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.no';
|
||||
break;
|
||||
case 'Low':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.low';
|
||||
break;
|
||||
case 'Medium':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.medium';
|
||||
break;
|
||||
case 'High':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.high';
|
||||
break;
|
||||
case 'Critical':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.critical';
|
||||
break;
|
||||
case 'Unknown':
|
||||
vulnerabilityStringTitle = 'vulnerabilityCountCard.unknown';
|
||||
break;
|
||||
}
|
||||
vulnerabilityStringTitle = t(vulnerabilityStringTitle);
|
||||
}
|
||||
switch (vulnerabilitySeverity) {
|
||||
case 'NONE':
|
||||
|
Loading…
Reference in New Issue
Block a user