diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 06383f12e..99a806cc8 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -16,24 +16,29 @@
-
{{ $t('message.vulnerable_projects') }}
- {{vulnerableProjects}} ({{vulnerableProjectPercent}}%) - +
{{ $t('severity.critical') }}
+ {{critical}} ({{criticalPercent}}%) +
- -
{{ $t('message.violations_audited') }}
- {{auditedViolations}} ({{auditedViolationsPercent}}%) - + +
{{ $t('severity.high') }}
+ {{high}} ({{highPercent}}%) + +
+ +
{{ $t('severity.medium') }}
+ {{medium}} ({{mediumPercent}}%) +
-
{{ $t('message.vulnerable_components') }}
- {{vulnerableComponents}} ({{vulnerableComponentPercent}}%) - +
{{ $t('severity.low') }}
+ {{low}} ({{lowPercent}}%) +
-
{{ $t('message.findings_audited') }}
- {{auditedFindings}} ({{auditedFindingPercent}}%) - +
{{ $t('severity.unassigned') }}
+ {{unassigned}} ({{unassignedPercent}}%) +
@@ -205,6 +210,16 @@ vulnerabilities: 0, suppressed: 0, + critical: 0, + criticalPercent: 0, + high: 0, + highPercent: 0, + medium: 0, + mediumPercent: 0, + low: 0, + lowPercent: 0, + unassigned: 0, + unassignedPercent: 0, lastMeasurement: "" } }, @@ -238,6 +253,16 @@ this.vulnerabilities = common.valueWithDefault(metric.vulnerabilities, "0"); this.suppressed = common.valueWithDefault(metric.suppressed, "0"); + this.critical = common.valueWithDefault(metric.critical, "0"); + this.criticalPercent = common.calcProgressPercent(this.vulnerabilities, this.critical); + this.high = common.valueWithDefault(metric.high, "0"); + this.highPercent = common.calcProgressPercent(this.vulnerabilities, this.high); + this.medium = common.valueWithDefault(metric.medium, "0"); + this.mediumPercent = common.calcProgressPercent(this.vulnerabilities, this.medium); + this.low = common.valueWithDefault(metric.low, "0"); + this.lowPercent = common.calcProgressPercent(this.vulnerabilities, this.low); + this.unassigned = common.valueWithDefault(metric.unassigned, "0"); + this.unassignedPercent = common.calcProgressPercent(this.vulnerabilities, this.unassigned); this.lastMeasurement = common.formatTimestamp(metric.lastOccurrence, true); }, refreshMetrics() {