Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - 20469 sbom status and download issue #20471

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading