diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 74dddba2d..299fe4741 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -50,6 +50,55 @@ +
+ + +
+ {{ $t("policy_violation.fails") }} +
+ {{ failViolations }} ({{ failViolationsPercent }}%) + +
+ +
+ {{ $t("policy_violation.warns") }} +
+ {{ warnViolations }} ({{ warnViolationsPercent }}%) + +
+ +
+ {{ $t("policy_violation.infos") }} +
+ {{ infoViolations }} ({{ infoViolationsPercent }}%) + +
+
+
@@ -177,6 +226,12 @@ totalViolations: 0, auditedViolations: 0, auditedViolationsPercent: 0, + failViolations: 0, + failViolationsPercent: 0, + warnViolations: 0, + warnViolationsPercent: 0, + infoViolations: 0, + infoViolationsPercent: 0, vulnerabilities: 0, suppressed: 0, @@ -199,11 +254,17 @@ this.totalFindings = common.valueWithDefault(metric.findingsTotal, "0"); this.auditedFindings = common.valueWithDefault(metric.findingsAudited, "0"); - this.auditedFindingPercent = common.calcProgressPercent(this.findingsTotal, this.findingsAudited); + this.auditedFindingPercent = common.calcProgressPercent(this.totalFindings, this.auditedFindings); this.totalViolations = common.valueWithDefault(metric.policyViolationsTotal, "0"); this.auditedViolations = common.valueWithDefault(metric.policyViolationsAudited, "0"); - this.auditedViolationsPercent = common.calcProgressPercent(this.policyViolationsTotal, this.policyViolationsAudited); + this.auditedViolationsPercent = common.calcProgressPercent(this.totalViolations, this.auditedViolations); + this.failViolations = common.valueWithDefault(metric.policyViolationsFail, "0"); + this.failViolationsPercent = common.calcProgressPercent(this.totalViolations, this.failViolations); + this.warnViolations = common.valueWithDefault(metric.policyViolationsWarn, "0"); + this.warnViolationsPercent = common.calcProgressPercent(this.totalViolations, this.warnViolations); + this.infoViolations = common.valueWithDefault(metric.policyViolationsInfo, "0"); + this.infoViolationsPercent = common.calcProgressPercent(this.totalViolations, this.infoViolations); this.vulnerabilities = common.valueWithDefault(metric.vulnerabilities, "0"); this.suppressed = common.valueWithDefault(metric.suppressed, "0");