mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
Fix - 20469 sbom status and download issue (#20471)
Fix sbom status and download issue Signed-off-by: xuelichao <xuel@vmware.com>
This commit is contained in:
parent
2f4fa29537
commit
3352a72b7a
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user