Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null pointer issue for creating reolication rule #17275

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix null pointer issue for creating reolication rule
Signed-off-by: AllForNothing <sshijun@vmware.com>
  • Loading branch information
AllForNothing committed Jul 30, 2022
commit 2eb37f7f1729b53e3012e926a18eda594a4de3e8
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h3 class="modal-title">{{headerTitle | translate}}</h3>
<clr-dropdown class="width-tag-label">
<button type="button" class="width-100 dropdown-toggle btn btn-link statistic-data label-text" clrDropdownTrigger>
<ng-template ngFor let-label [ngForOf]="filter.value.value" let-m="index">
<hbr-label-piece *ngIf="m < 1" [hasIcon]="false" [label]="getLabel(label)" [labelWidth]="84"></hbr-label-piece>
<hbr-label-piece *ngIf="m < 1 && label" [hasIcon]="false" [label]="getLabel(label)" [labelWidth]="84"></hbr-label-piece>
</ng-template>
<span class="ellipsis color-white-dark" *ngIf="filter.value.value.length>1">···</span>
<div *ngFor="let label1 of filter.value.value;let k = index" hidden="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ export class CreateEditRuleComponent implements OnInit, OnDestroy {

setFilterAndTrigger(adapter) {
this.supportedFilters = adapter.supported_resource_filters;
this.filters.clear(); // clear before init
this.supportedFilters.forEach(element => {
this.filters.push(this.initFilter(element.type));
});
Expand Down