mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Fix null pointer issue for creating reolication rule (#17274)
Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
0fe5eed55d
commit
455ebf51fc
@ -26,7 +26,6 @@
|
|||||||
<clr-dropdown-menu *clrIfOpen>
|
<clr-dropdown-menu *clrIfOpen>
|
||||||
<button
|
<button
|
||||||
[disabled]="!hasPermission || !canClickExport"
|
[disabled]="!hasPermission || !canClickExport"
|
||||||
[clrLoading]="checkingPermission"
|
|
||||||
clrDropdownItem
|
clrDropdownItem
|
||||||
(click)="exportCVE()">
|
(click)="exportCVE()">
|
||||||
<clr-icon shape="export" size="16"></clr-icon>
|
<clr-icon shape="export" size="16"></clr-icon>
|
||||||
|
@ -91,7 +91,6 @@ export class ListProjectComponent implements OnDestroy {
|
|||||||
@ViewChild(ExportCveComponent)
|
@ViewChild(ExportCveComponent)
|
||||||
exportCveComponent: ExportCveComponent;
|
exportCveComponent: ExportCveComponent;
|
||||||
hasPermission: boolean = false;
|
hasPermission: boolean = false;
|
||||||
checkingPermission: boolean = false;
|
|
||||||
canClickExport: boolean = true;
|
canClickExport: boolean = true;
|
||||||
constructor(
|
constructor(
|
||||||
private session: SessionService,
|
private session: SessionService,
|
||||||
@ -409,14 +408,11 @@ export class ListProjectComponent implements OnDestroy {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
this.checkingPermission = true;
|
forkJoin(obs).subscribe(res => {
|
||||||
forkJoin(obs)
|
if (res?.length) {
|
||||||
.pipe(finalize(() => (this.checkingPermission = false)))
|
this.hasPermission = res.every(item => item);
|
||||||
.subscribe(res => {
|
}
|
||||||
if (res?.length) {
|
});
|
||||||
this.hasPermission = res.every(item => item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
triggerExportSuccess() {
|
triggerExportSuccess() {
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
let-m="index">
|
let-m="index">
|
||||||
<hbr-label-piece
|
<hbr-label-piece
|
||||||
class="label-piece"
|
class="label-piece"
|
||||||
*ngIf="m < 1"
|
*ngIf="m < 1 && label"
|
||||||
[hasIcon]="false"
|
[hasIcon]="false"
|
||||||
[label]="
|
[label]="
|
||||||
getLabel(label)
|
getLabel(label)
|
||||||
|
@ -639,10 +639,10 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
setFilterAndTrigger(adapter) {
|
setFilterAndTrigger(adapter) {
|
||||||
this.supportedFilters = adapter.supported_resource_filters;
|
this.supportedFilters = adapter.supported_resource_filters;
|
||||||
|
this.filters.clear(); // clear before init
|
||||||
this.supportedFilters.forEach(element => {
|
this.supportedFilters.forEach(element => {
|
||||||
this.filters.push(this.initFilter(element.type));
|
this.filters.push(this.initFilter(element.type));
|
||||||
});
|
});
|
||||||
|
|
||||||
this.supportedTriggers = adapter.supported_triggers;
|
this.supportedTriggers = adapter.supported_triggers;
|
||||||
this.ruleForm
|
this.ruleForm
|
||||||
.get('trigger')
|
.get('trigger')
|
||||||
|
Loading…
Reference in New Issue
Block a user