Skip to content

Commit

Permalink
fix: disable the scan related button when installation without scanne…
Browse files Browse the repository at this point in the history
…r or scanner deactived (#20652)

Signed-off-by: chlins <[email protected]>
  • Loading branch information
chlins authored Jun 25, 2024
1 parent 04b0cc0 commit 35d1032
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ export class ArtifactListPageService {
ClrLoadingState.ERROR
);
}
} else {
this.updateStates(
false,
ClrLoadingState.ERROR,
ClrLoadingState.ERROR
);
}
},
error => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<clr-dg-action-bar class="action-bar">
<div>
<button
*ngIf="hasEnabledScanner"
id="scan-btn"
[clrLoading]="scanBtnState"
type="button"
Expand All @@ -35,7 +34,6 @@
<span>{{ 'VULNERABILITY.SCAN_NOW' | translate }}</span>
</button>
<button
*ngIf="hasEnabledSbom()"
id="generate-sbom-btn"
[clrLoading]="generateSbomBtnState"
type="button"
Expand Down Expand Up @@ -69,7 +67,6 @@
<button
clrDropdownItem
id="stop-scan"
*ngIf="hasEnabledScanner"
[clrLoading]="stopBtnState"
type="button"
class="btn btn-secondary scan-btn action-dropdown-item"
Expand All @@ -84,7 +81,6 @@
<button
clrDropdownItem
id="stop-sbom-btn"
*ngIf="hasEnabledSbom()"
[clrLoading]="stopBtnState"
type="button"
class="btn btn-secondary scan-btn action-dropdown-item"
Expand All @@ -99,7 +95,6 @@
<span>{{ 'SBOM.STOP' | translate }}</span>
</button>
<div
*ngIf="hasEnabledScanner || hasEnabledSbom()"
class="dropdown-divider"
role="separator"
aria-hidden="true"></div>
Expand Down

0 comments on commit 35d1032

Please sign in to comment.