mirror of
https://github.com/goharbor/harbor
synced 2024-09-20 11:55:39 +00:00
fix: disable the scan related button when installation without scanner or scanner deactived (#20652)
Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
parent
04b0cc0b08
commit
35d1032ff7
|
@ -127,6 +127,12 @@ export class ArtifactListPageService {
|
||||||
ClrLoadingState.ERROR
|
ClrLoadingState.ERROR
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.updateStates(
|
||||||
|
false,
|
||||||
|
ClrLoadingState.ERROR,
|
||||||
|
ClrLoadingState.ERROR
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
<clr-dg-action-bar class="action-bar">
|
<clr-dg-action-bar class="action-bar">
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
*ngIf="hasEnabledScanner"
|
|
||||||
id="scan-btn"
|
id="scan-btn"
|
||||||
[clrLoading]="scanBtnState"
|
[clrLoading]="scanBtnState"
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -35,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"
|
||||||
|
@ -69,7 +67,6 @@
|
||||||
<button
|
<button
|
||||||
clrDropdownItem
|
clrDropdownItem
|
||||||
id="stop-scan"
|
id="stop-scan"
|
||||||
*ngIf="hasEnabledScanner"
|
|
||||||
[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"
|
||||||
|
@ -84,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"
|
||||||
|
@ -99,7 +95,6 @@
|
||||||
<span>{{ 'SBOM.STOP' | translate }}</span>
|
<span>{{ 'SBOM.STOP' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
*ngIf="hasEnabledScanner || hasEnabledSbom()"
|
|
||||||
class="dropdown-divider"
|
class="dropdown-divider"
|
||||||
role="separator"
|
role="separator"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user