From 37f046213a628b1950251d0aba7e9c4c54e1021c Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 28 Jan 2024 11:00:19 -0500 Subject: [PATCH 1/4] refactor(dashboard): swap vulnerabilities for violations. Signed-off-by: Adam Setch --- src/views/Dashboard.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 8bdb5ed5b..e89263840 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -165,9 +165,9 @@ - - {{ $t('message.portfolio_vulnerabilities') }}
- {{vulnerabilities}} + + {{ $t('message.policy_violations') }}
+ {{totalViolations}}
From 00088b6a7b5989543b3c808f5b2684e0ea08c26c Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 28 Jan 2024 17:12:55 -0500 Subject: [PATCH 2/4] refactor(statistics): update portfolio statistics Signed-off-by: Adam Setch --- src/i18n/locales/en.json | 1 + src/views/Dashboard.vue | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index d7d0fafac..40b3df999 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -42,6 +42,7 @@ "inherited_risk_score": "Inherited Risk Score", "risk_score": "Risk Score", "vulnerable_projects": "Vulnerable Projects", + "findings": "Findings", "total_findings": "Total Findings", "findings_audited": "Findings Audited", "auditing_progress": "Auditing Progress", diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index e89263840..c58af8678 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -146,7 +146,7 @@ - + @@ -162,14 +162,30 @@ - + + + + {{ $t('message.portfolio_vulnerabilities') }}
+ {{vulnerabilities}} +
+
{{ $t('message.policy_violations') }}
{{totalViolations}}
+
+
+ + + + + {{ $t('message.findings') }}
+ {{totalFindings}} +
+
{{ $t('message.suppressed') }}
From 272c65d158b852cc540267ffd46b16ac3f18e3d0 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 28 Jan 2024 17:28:08 -0500 Subject: [PATCH 3/4] refactor(statistics): update portfolio statistics Signed-off-by: Adam Setch --- src/views/Dashboard.vue | 52 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index e32a25e5d..907bf2842 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -124,12 +124,28 @@ {{totalProjects}}
+ + + {{ $t('message.vulnerable_projects') }}
+ {{vulnerableProjects}} +
+
+
+
+ + {{ $t('message.components') }}
{{totalComponents}}
+ + + {{ $t('message.vulnerable_components') }}
+ {{vulnerableComponents}} +
+
@@ -141,25 +157,43 @@ - + + {{ $t('message.suppressed') }}
+ {{suppressed}} +
+
+
+
+
+ + + + + {{ $t('message.policy_violations') }}
{{totalViolations}}
+ + + {{ $t('policy_violation.license') }}
+ {{licenseViolations}} +
+
- {{ $t('message.findings') }}
- {{totalFindings}} + {{ $t('policy_violation.operational') }}
+ {{operationalViolations}}
- - {{ $t('message.suppressed') }}
- {{suppressed}} + + {{ $t('policy_violation.security') }}
+ {{securityViolations}}
@@ -218,6 +252,9 @@ warnViolationsPercent: 0, infoViolations: 0, infoViolationsPercent: 0, + licenseViolations: 0, + operationalViolations: 0, + securityViolations: 0, vulnerabilities: 0, suppressed: 0, @@ -251,6 +288,9 @@ this.warnViolationsPercent = common.calcProgressPercent(this.totalViolations, this.warnViolations); this.infoViolations = common.valueWithDefault(metric.policyViolationsInfo, "0"); this.infoViolationsPercent = common.calcProgressPercent(this.totalViolations, this.infoViolations); + this.licenseViolations = common.valueWithDefault(metric.policyViolationsLicenseTotal,"0"); + this.operationalViolations = common.valueWithDefault(metric.policyViolationsOperationalTotal,"0"); + this.securityViolations = common.valueWithDefault(metric.policyViolationsSecurityTotal,"0"); this.vulnerabilities = common.valueWithDefault(metric.vulnerabilities, "0"); this.suppressed = common.valueWithDefault(metric.suppressed, "0"); From 5ff3870538f14a9138e4fd09e016d4c098041028 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 28 Jan 2024 17:31:31 -0500 Subject: [PATCH 4/4] refactor(statistics): update portfolio statistics Signed-off-by: Adam Setch --- src/i18n/locales/en.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 40b3df999..d7d0fafac 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -42,7 +42,6 @@ "inherited_risk_score": "Inherited Risk Score", "risk_score": "Risk Score", "vulnerable_projects": "Vulnerable Projects", - "findings": "Findings", "total_findings": "Total Findings", "findings_audited": "Findings Audited", "auditing_progress": "Auditing Progress",