diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts index a488d13c6..8fe3c5812 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts @@ -228,6 +228,8 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy { this.translate.get("CONFIG.SCANNING.TRIGGER_SCAN_ALL_SUCCESS").subscribe((res: string) => { this.errorHandler.info(res); }); + // reset metrics and then get new metrics + this.scanningMetrics = null; this.getManualMetrics(); } , error => { diff --git a/src/portal/lib/src/tag/tag.component.ts b/src/portal/lib/src/tag/tag.component.ts index 970f525c6..a3078c190 100644 --- a/src/portal/lib/src/tag/tag.component.ts +++ b/src/portal/lib/src/tag/tag.component.ts @@ -745,12 +745,9 @@ export class TagComponent implements OnInit, AfterViewInit { } // Trigger scan scanNow(): void { - if (this.selectedRow && this.selectedRow.length) { - this.selectedRow.forEach((data: any) => { - let tagId = data.name; + if (this.selectedRow && this.selectedRow.length === 1) { this.onSendingScanCommand = true; - this.channel.publishScanEvent(this.repoName + "/" + tagId); - }); + this.channel.publishScanEvent(this.repoName + "/" + this.selectedRow[0].name); } } submitFinish(e: boolean) { diff --git a/src/portal/lib/src/vulnerability-scanning/result-bar-chart.component.ts b/src/portal/lib/src/vulnerability-scanning/result-bar-chart.component.ts index 8cdbe470e..3dbb95e29 100644 --- a/src/portal/lib/src/vulnerability-scanning/result-bar-chart.component.ts +++ b/src/portal/lib/src/vulnerability-scanning/result-bar-chart.component.ts @@ -138,7 +138,11 @@ export class ResultBarChartComponent implements OnInit, OnDestroy { } }, error => { this.onSubmitting = false; - this.errorHandler.error(error); + if (error && error.error && error.error.code === 409) { + console.log(error.error.message); + } else { + this.errorHandler.error(error); + } }); }