Skip to content

Commit

Permalink
[Cloud Security] [Quick Wins] [CNVM Dashboard] Reverse Severity order (
Browse files Browse the repository at this point in the history
  • Loading branch information
opauloh authored Jul 20, 2023
1 parent 7152707 commit f2914fc
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ const getUniqueCloudAccountsOptions = (
const uniqueCloudAccounts: Array<{ label: string; value: string }> = [];

vulnTrends.forEach((trendTimepoint) => {
const accountStatss = Object.values(
const accountsStats = Object.values(
trendTimepoint.vulnerabilities_stats_by_cloud_account || {}
);

accountStatss.forEach((accountStats) => {
accountsStats.forEach((accountStats) => {
// Check if the entry already exists based on the cloudAccountId
const isDuplicate = uniqueCloudAccounts.find(
(account) => account.value === accountStats.cloudAccountId
Expand Down Expand Up @@ -163,24 +163,24 @@ export const VulnerabilityTrendGraph = () => {
}> = useMemo(
() => [
{
id: VULNERABILITIES_SEVERITY.CRITICAL,
yAccessors: ['critical'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.CRITICAL),
},
{
id: VULNERABILITIES_SEVERITY.HIGH,
yAccessors: ['high'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.HIGH),
id: VULNERABILITIES_SEVERITY.LOW,
yAccessors: ['low'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.LOW),
},
{
id: VULNERABILITIES_SEVERITY.MEDIUM,
yAccessors: ['medium'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.MEDIUM),
},
{
id: VULNERABILITIES_SEVERITY.LOW,
yAccessors: ['low'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.LOW),
id: VULNERABILITIES_SEVERITY.HIGH,
yAccessors: ['high'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.HIGH),
},
{
id: VULNERABILITIES_SEVERITY.CRITICAL,
yAccessors: ['critical'],
color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.CRITICAL),
},
],
[]
Expand Down

0 comments on commit f2914fc

Please sign in to comment.