From 37f046213a628b1950251d0aba7e9c4c54e1021c Mon Sep 17 00:00:00 2001
From: Adam Setch <adam.setch@outlook.com>
Date: Sun, 28 Jan 2024 11:00:19 -0500
Subject: [PATCH 1/4] refactor(dashboard): swap vulnerabilities for violations.

Signed-off-by: Adam Setch <adam.setch@outlook.com>
---
 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 @@
             <b-col sm="12" lg="6">
               <b-row>
                 <b-col sm="6">
-                  <Callout variant="info">
-                    <small class="text-muted">{{ $t('message.portfolio_vulnerabilities') }}</small><br>
-                    <strong class="h4">{{vulnerabilities}}</strong>
+                  <Callout variant="danger">
+                    <small class="text-muted">{{ $t('message.policy_violations') }}</small><br>
+                    <strong class="h4">{{totalViolations}}</strong>
                   </Callout>
                 </b-col>
                 <b-col sm="6">

From 00088b6a7b5989543b3c808f5b2684e0ea08c26c Mon Sep 17 00:00:00 2001
From: Adam Setch <adam.setch@outlook.com>
Date: Sun, 28 Jan 2024 17:12:55 -0500
Subject: [PATCH 2/4] refactor(statistics): update portfolio statistics

Signed-off-by: Adam Setch <adam.setch@outlook.com>
---
 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 @@
       <b-col md="12">
         <b-card v-bind:header="$t('message.portfolio_statistics')">
           <b-row>
-            <b-col sm="12" lg="6">
+            <b-col sm="12" lg="4">
               <b-row>
                 <b-col sm="6">
                   <Callout variant="info">
@@ -162,14 +162,30 @@
                 </b-col>
               </b-row>
             </b-col>
-            <b-col sm="12" lg="6">
+            <b-col sm="12" lg="4">
               <b-row>
+                <b-col sm="6">
+                  <Callout variant="danger">
+                    <small class="text-muted">{{ $t('message.portfolio_vulnerabilities') }}</small><br>
+                    <strong class="h4">{{vulnerabilities}}</strong>
+                  </Callout>
+                </b-col>
                 <b-col sm="6">
                   <Callout variant="danger">
                     <small class="text-muted">{{ $t('message.policy_violations') }}</small><br>
                     <strong class="h4">{{totalViolations}}</strong>
                   </Callout>
                 </b-col>
+              </b-row>
+            </b-col>
+            <b-col sm="12" lg="4">
+              <b-row>
+                <b-col sm="6">
+                  <Callout variant="info">
+                    <small class="text-muted">{{ $t('message.findings') }}</small><br>
+                    <strong class="h4">{{totalFindings}}</strong>
+                  </Callout>
+                </b-col>
                 <b-col sm="6">
                   <Callout variant="info">
                     <small class="text-muted">{{ $t('message.suppressed') }}</small><br>

From 272c65d158b852cc540267ffd46b16ac3f18e3d0 Mon Sep 17 00:00:00 2001
From: Adam Setch <adam.setch@outlook.com>
Date: Sun, 28 Jan 2024 17:28:08 -0500
Subject: [PATCH 3/4] refactor(statistics): update portfolio statistics

Signed-off-by: Adam Setch <adam.setch@outlook.com>
---
 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 @@
                     <strong class="h4">{{totalProjects}}</strong>
                   </Callout>
                 </b-col>
+                <b-col sm="6">
+                  <Callout variant="danger">
+                    <small class="text-muted">{{ $t('message.vulnerable_projects') }}</small><br>
+                    <strong class="h4">{{vulnerableProjects}}</strong>
+                  </Callout>
+                </b-col>
+              </b-row>
+            </b-col>
+            <b-col sm="12" lg="4">
+              <b-row>
                 <b-col sm="6">
                   <Callout variant="info">
                     <small class="text-muted">{{ $t('message.components') }}</small><br>
                     <strong class="h4">{{totalComponents}}</strong>
                   </Callout>
                 </b-col>
+                <b-col sm="6">
+                  <Callout variant="danger">
+                    <small class="text-muted">{{ $t('message.vulnerable_components') }}</small><br>
+                    <strong class="h4">{{vulnerableComponents}}</strong>
+                  </Callout>
+                </b-col>
               </b-row>
             </b-col>
             <b-col sm="12" lg="4">
@@ -141,25 +157,43 @@
                   </Callout>
                 </b-col>
                 <b-col sm="6">
-                  <Callout variant="danger">
+                  <Callout variant="warning">
+                    <small class="text-muted">{{ $t('message.suppressed') }}</small><br>
+                    <strong class="h4">{{suppressed}}</strong>
+                  </Callout>
+                </b-col>
+              </b-row>
+            </b-col>
+          </b-row>
+          <b-row>
+            <b-col sm="12" lg="4">
+              <b-row>
+                <b-col sm="6">
+                  <Callout variant="info">
                     <small class="text-muted">{{ $t('message.policy_violations') }}</small><br>
                     <strong class="h4">{{totalViolations}}</strong>
                   </Callout>
                 </b-col>
+                <b-col sm="6">
+                  <Callout variant="info">
+                    <small class="text-muted">{{ $t('policy_violation.license') }}</small><br>
+                    <strong class="h4">{{licenseViolations}}</strong>
+                  </Callout>
+                </b-col>
               </b-row>
             </b-col>
             <b-col sm="12" lg="4">
               <b-row>
                 <b-col sm="6">
                   <Callout variant="info">
-                    <small class="text-muted">{{ $t('message.findings') }}</small><br>
-                    <strong class="h4">{{totalFindings}}</strong>
+                    <small class="text-muted">{{ $t('policy_violation.operational') }}</small><br>
+                    <strong class="h4">{{operationalViolations}}</strong>
                   </Callout>
                 </b-col>
                 <b-col sm="6">
-                  <Callout variant="warning">
-                    <small class="text-muted">{{ $t('message.suppressed') }}</small><br>
-                    <strong class="h4">{{suppressed}}</strong>
+                  <Callout variant="info">
+                    <small class="text-muted">{{ $t('policy_violation.security') }}</small><br>
+                    <strong class="h4">{{securityViolations}}</strong>
                   </Callout>
                 </b-col>
               </b-row>
@@ -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 <adam.setch@outlook.com>
Date: Sun, 28 Jan 2024 17:31:31 -0500
Subject: [PATCH 4/4] refactor(statistics): update portfolio statistics

Signed-off-by: Adam Setch <adam.setch@outlook.com>
---
 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",