[cherry-pick] fix: disable the scan related button when installation without scanner or scanner deactived (#20661)

fix: disable the scan related button when installation without scanner or scanner deactived

Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
Chlins Zhang 2024-06-26 12:45:48 +08:00 committed by GitHub
parent 08e5553536
commit 04e360660b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -127,6 +127,12 @@ export class ArtifactListPageService {
ClrLoadingState.ERROR ClrLoadingState.ERROR
); );
} }
} else {
this.updateStates(
false,
ClrLoadingState.ERROR,
ClrLoadingState.ERROR
);
} }
}, },
error => { error => {

View File

@ -34,7 +34,6 @@
<span>{{ 'VULNERABILITY.SCAN_NOW' | translate }}</span> <span>{{ 'VULNERABILITY.SCAN_NOW' | translate }}</span>
</button> </button>
<button <button
*ngIf="hasEnabledSbom()"
id="generate-sbom-btn" id="generate-sbom-btn"
[clrLoading]="generateSbomBtnState" [clrLoading]="generateSbomBtnState"
type="button" type="button"
@ -82,7 +81,6 @@
<button <button
clrDropdownItem clrDropdownItem
id="stop-sbom-btn" id="stop-sbom-btn"
*ngIf="hasEnabledSbom()"
[clrLoading]="stopBtnState" [clrLoading]="stopBtnState"
type="button" type="button"
class="btn btn-secondary scan-btn action-dropdown-item" class="btn btn-secondary scan-btn action-dropdown-item"