diff --git a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html index a58021c69..1b0d3b20d 100644 --- a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html +++ b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.html @@ -6,7 +6,7 @@ {{ updatedTimeStr }}
diff --git a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.spec.ts b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.spec.ts index 61823ba99..e89ba6c19 100644 --- a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.spec.ts +++ b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.spec.ts @@ -103,6 +103,7 @@ describe('VulnerabilityConfigComponent', () => { it('should stop looping manual metrics if manual scanning is finished', () => { component.scanningMetrics.isScheduled = false; component.scanningMetrics.ongoing = false; + component.hasDefaultScanner = true; expect(component.scanAvailable).toBeTruthy(); }); }); diff --git a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts index 99f5a1153..462887857 100644 --- a/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts +++ b/src/portal/src/lib/components/config/vulnerability/vulnerability-config.component.ts @@ -41,6 +41,7 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy { private _loopManualInterval; updatedTimeStr: string; onGettingUpdatedTimeStr: boolean; + hasDefaultScanner: boolean = false; constructor( private scanningService: ScanAllRepoService, private errorHandler: ErrorHandler, @@ -86,7 +87,8 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy { get scanAvailable(): boolean { return !this.onSubmitting && !this.gettingMetrics - && !this.isOnScanning(); + && !this.isOnScanning() + && this.hasDefaultScanner; } getScanText() { @@ -119,6 +121,9 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy { } }); } + if (flag) { + this.hasDefaultScanner = true; + } if (!flag) { this.onGettingUpdatedTimeStr = false; }