diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html index a58021c69..1b0d3b20d 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.html @@ -6,7 +6,7 @@ {{ updatedTimeStr }}
diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.spec.ts b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.spec.ts index 805a619ea..2e99e1c7f 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.spec.ts +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.spec.ts @@ -100,6 +100,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/lib/src/config/vulnerability/vulnerability-config.component.ts b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts index d8f3f256c..03a53d55d 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.ts +++ b/src/portal/lib/src/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, @@ -119,6 +120,9 @@ export class VulnerabilityConfigComponent implements OnInit, OnDestroy { } }); } + if (flag) { + this.hasDefaultScanner = true; + } if (!flag) { this.onGettingUpdatedTimeStr = false; } diff --git a/src/portal/src/app/project/tag-retention/tag-retention.component.ts b/src/portal/src/app/project/tag-retention/tag-retention.component.ts index 58a38910c..28c69795c 100644 --- a/src/portal/src/app/project/tag-retention/tag-retention.component.ts +++ b/src/portal/src/app/project/tag-retention/tag-retention.component.ts @@ -116,14 +116,7 @@ export class TagRetentionComponent implements OnInit { level: "project", ref: this.projectId }; - let resolverData = this.route.snapshot.parent.data; - if (resolverData) { - let project =