Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(project): finding badges including and excluding aliases #736

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ button:focus {
margin-left: 0.6em !important;
color: #21D983 !important;
}
.badge-tab-info {
border: 1px solid #60768c !important;
background-color: $grey-900 !important;
color: $notification-info !important;
}
.badge-tag {
color: $primary;
background-color: transparent;
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"vulnerable_projects": "Vulnerable Projects",
"findings": "Findings",
"total_findings": "Total Findings",
"total_findings_including_aliases": "Total Findings (including aliases)",
"total_findings_excluding_aliases": "Total Findings (excluding aliases)",
"findings_audited": "Findings Audited",
"findings_unaudited": "Findings Unaudited",
"auditing_progress": "Auditing Progress",
Expand Down
10 changes: 8 additions & 2 deletions src/views/portfolio/projects/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,12 @@
<project-dependency-graph :key="this.uuid" :uuid="this.uuid" :project="this.project" v-on:total="totalDependencyGraphs = $event" />
</b-tab>
<b-tab ref="findings" v-if="isPermitted(PERMISSIONS.VIEW_VULNERABILITY)" @click="routeTo('findings')">
<template v-slot:title><i class="fa fa-tasks"></i> {{ $t('message.audit_vulnerabilities') }} <b-badge variant="tab-total">{{ totalFindings }}</b-badge></template>
<project-findings :key="this.uuid" :uuid="this.uuid" v-on:total="totalFindings = $event" />
<template v-slot:title>
<i class="fa fa-tasks"></i> {{ $t('message.audit_vulnerabilities') }}
<b-badge variant="tab-total" v-b-tooltip.hover :title="$t('message.total_findings_excluding_aliases')">{{ totalFindings }}</b-badge>
<b-badge variant="tab-info" v-b-tooltip.hover :title="$t('message.total_findings_including_aliases')">{{ totalFindingsIncludingAliases }}</b-badge>
</template>
<project-findings :key="this.uuid" :uuid="this.uuid" v-on:total="totalFindingsIncludingAliases = $event" />
</b-tab>
<b-tab ref="epss" v-if="isPermitted(PERMISSIONS.VIEW_VULNERABILITY)" @click="routeTo('epss')">
<template v-slot:title><i class="fa fa-tasks"></i> {{ $t('message.exploit_predictions') }} <b-badge variant="tab-total">{{ totalEpss }}</b-badge></template>
Expand Down Expand Up @@ -222,6 +226,7 @@
totalServices: 0,
totalDependencyGraphs: 0,
totalFindings: 0,
totalFindingsIncludingAliases: 0,
totalEpss: 0,
totalViolations: 0,
tabIndex: 0
Expand Down Expand Up @@ -253,6 +258,7 @@
this.currentLow = common.valueWithDefault(this.project.metrics.low, 0);
this.currentUnassigned = common.valueWithDefault(this.project.metrics.unassigned, 0);
this.currentRiskScore = common.valueWithDefault(this.project.metrics.inheritedRiskScore, 0);
this.totalFindings = common.valueWithDefault(this.project.metrics.findingsTotal, 0)
EventBus.$emit('addCrumb', this.projectLabel);
this.$title = this.projectLabel;
});
Expand Down