|
309 | 309 | variant="tab-total"
|
310 | 310 | v-b-tooltip.hover
|
311 | 311 | :title="$t('policy_violation.total')"
|
312 |
| - >{{ totalViolations }}</b-badge |
| 312 | + >{{ |
| 313 | + showSuppressedViolations |
| 314 | + ? policyViolationsTotal |
| 315 | + : policyViolationsUnaudited |
| 316 | + }}</b-badge |
313 | 317 | >
|
314 | 318 | <b-badge
|
315 | 319 | variant="tab-info"
|
316 | 320 | v-b-tooltip.hover
|
317 | 321 | :title="$t('policy_violation.infos')"
|
318 |
| - >{{ infoViolations }}</b-badge |
| 322 | + >{{ |
| 323 | + showSuppressedViolations |
| 324 | + ? policyViolationsInfoTotal |
| 325 | + : policyViolationsInfoUnaudited |
| 326 | + }}</b-badge |
319 | 327 | >
|
320 | 328 | <b-badge
|
321 | 329 | variant="tab-warn"
|
322 | 330 | v-b-tooltip.hover
|
323 | 331 | :title="$t('policy_violation.warns')"
|
324 |
| - >{{ warnViolations }}</b-badge |
| 332 | + >{{ |
| 333 | + showSuppressedViolations |
| 334 | + ? policyViolationsWarnTotal |
| 335 | + : policyViolationsWarnUnaudited |
| 336 | + }}</b-badge |
325 | 337 | >
|
326 | 338 | <b-badge
|
327 | 339 | variant="tab-fail"
|
328 | 340 | v-b-tooltip.hover
|
329 | 341 | :title="$t('policy_violation.fails')"
|
330 |
| - >{{ failViolations }}</b-badge |
| 342 | + >{{ |
| 343 | + showSuppressedViolations |
| 344 | + ? policyViolationsFailTotal |
| 345 | + : policyViolationsFailUnaudited |
| 346 | + }}</b-badge |
331 | 347 | >
|
332 | 348 | </template>
|
333 | 349 | <project-policy-violations
|
334 | 350 | :key="this.uuid"
|
335 | 351 | :uuid="this.uuid"
|
336 |
| - v-on:total="totalViolations = $event" |
| 352 | + v-on:showSuppressedViolations="showSuppressedViolations = $event" |
337 | 353 | />
|
338 | 354 | </b-tab>
|
339 | 355 | </b-tabs>
|
@@ -428,10 +444,15 @@ export default {
|
428 | 444 | totalFindings: 0,
|
429 | 445 | totalFindingsIncludingAliases: 0,
|
430 | 446 | totalEpss: 0,
|
431 |
| - totalViolations: 0, |
432 |
| - infoViolations: 0, |
433 |
| - warnViolations: 0, |
434 |
| - failViolations: 0, |
| 447 | + showSuppressedViolations: false, |
| 448 | + policyViolationsTotal: 0, |
| 449 | + policyViolationsUnaudited: 0, |
| 450 | + policyViolationsFailTotal: 0, |
| 451 | + policyViolationsFailUnaudited: 0, |
| 452 | + policyViolationsWarnTotal: 0, |
| 453 | + policyViolationsWarnUnaudited: 0, |
| 454 | + policyViolationsInfoTotal: 0, |
| 455 | + policyViolationsInfoUnaudited: 0, |
435 | 456 | tabIndex: 0,
|
436 | 457 | };
|
437 | 458 | },
|
@@ -486,16 +507,36 @@ export default {
|
486 | 507 | this.project.metrics.findingsTotal,
|
487 | 508 | 0,
|
488 | 509 | );
|
489 |
| - this.infoViolations = common.valueWithDefault( |
490 |
| - this.project.metrics.policyViolationsInfo, |
| 510 | + this.policyViolationsTotal = common.valueWithDefault( |
| 511 | + this.project.metrics.policyViolationsTotal, |
491 | 512 | 0,
|
492 | 513 | );
|
493 |
| - this.warnViolations = common.valueWithDefault( |
494 |
| - this.project.metrics.policyViolationsWarn, |
| 514 | + this.policyViolationsUnaudited = common.valueWithDefault( |
| 515 | + this.project.metrics.policyViolationsUnaudited, |
495 | 516 | 0,
|
496 | 517 | );
|
497 |
| - this.failViolations = common.valueWithDefault( |
498 |
| - this.project.metrics.policyViolationsFail, |
| 518 | + this.policyViolationsFailTotal = common.valueWithDefault( |
| 519 | + this.project.metrics.policyViolationsFailTotal, |
| 520 | + 0, |
| 521 | + ); |
| 522 | + this.policyViolationsFailUnaudited = common.valueWithDefault( |
| 523 | + this.project.metrics.policyViolationsFailUnaudited, |
| 524 | + 0, |
| 525 | + ); |
| 526 | + this.policyViolationsWarnTotal = common.valueWithDefault( |
| 527 | + this.project.metrics.policyViolationsWarnTotal, |
| 528 | + 0, |
| 529 | + ); |
| 530 | + this.policyViolationsWarnUnaudited = common.valueWithDefault( |
| 531 | + this.project.metrics.policyViolationsWarnUnaudited, |
| 532 | + 0, |
| 533 | + ); |
| 534 | + this.policyViolationsInfoTotal = common.valueWithDefault( |
| 535 | + this.project.metrics.policyViolationsInfoTotal, |
| 536 | + 0, |
| 537 | + ); |
| 538 | + this.policyViolationsInfoUnaudited = common.valueWithDefault( |
| 539 | + this.project.metrics.policyViolationsInfoUnaudited, |
499 | 540 | 0,
|
500 | 541 | );
|
501 | 542 | EventBus.$emit('addCrumb', this.projectLabel);
|
|
0 commit comments