diff --git a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-sbom/artifact-sbom.component.ts b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-sbom/artifact-sbom.component.ts index c37ee3c1616..9ca60c39ba4 100644 --- a/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-sbom/artifact-sbom.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/artifact-additions/artifact-sbom/artifact-sbom.component.ts @@ -198,7 +198,9 @@ export class ArtifactSbomComponent implements OnInit, OnDestroy { this.downloadSbomBtnState = ClrLoadingState.LOADING; if ( this.artifact?.sbom_overview?.scan_status === - SBOM_SCAN_STATUS.SUCCESS + SBOM_SCAN_STATUS.SUCCESS || + !!this.sbomDigest || + (this.artifactSbom.sbomJsonRaw && this.artifactSbom.sbomName) ) { downloadJson( this.artifactSbom.sbomJsonRaw, diff --git a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts index 34c17cf3510..28bb81689df 100644 --- a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts +++ b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.spec.ts @@ -213,7 +213,7 @@ describe('ResultSbomComponent (inline template)', () => { component.sbomOverview = mockedSbomOverview; fixture.detectChanges(); expect(component.status).toBe(SBOM_SCAN_STATUS.ERROR); - expect(component.completed).toBeFalsy(); + expect(component.completed).toBeTruthy(); expect(component.queued).toBeFalsy(); expect(component.generating).toBeFalsy(); expect(component.stopped).toBeFalsy(); diff --git a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.ts b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.ts index 15f0c5c358e..a2d92351885 100644 --- a/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.ts +++ b/src/portal/src/app/base/project/repository/artifact/sbom-scanning/sbom-scan.component.ts @@ -129,7 +129,7 @@ export class ResultSbomComponent implements OnInit, OnDestroy { } public get completed(): boolean { - return this.status === SBOM_SCAN_STATUS.SUCCESS; + return this.status === SBOM_SCAN_STATUS.SUCCESS || !!this.sbomDigest; } public get error(): boolean {