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

Signed-off-by: chlins <[email protected]>
  • Loading branch information
chlins committed Jun 24, 2024
1 parent ab13c65 commit c1fd287
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 c1fd287

Please sign in to comment.