mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Cloud Security] [Quick Wins] [CNVM Dashboard] Reverse Severity order (#162359)
This commit is contained in:
parent
7152707b7f
commit
f2914fca9c
1 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
|
@ -163,14 +163,9 @@ 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,
|
||||
|
@ -178,9 +173,14 @@ export const VulnerabilityTrendGraph = () => {
|
|||
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),
|
||||
},
|
||||
],
|
||||
[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue