"@types/file-saver": "2.0.1",
"async-mutex": "0.2.4",
"bootstrap": "5.2.3",
- "carbon-components-angular": "5.25.1",
+ "carbon-components-angular": "5.48.0",
"chart.js": "4.4.0",
"chartjs-adapter-moment": "1.0.1",
"detect-browser": "5.2.0",
]
},
"node_modules/carbon-components-angular": {
- "version": "5.25.1",
- "resolved": "https://registry.npmjs.org/carbon-components-angular/-/carbon-components-angular-5.25.1.tgz",
- "integrity": "sha512-v49djZmcHs47G7wzaS+SQUTqp+vErlHDc4ohbsx29Q+Jq1m6IJSaTUCN9GuQG/lLa7W1se0vS23TOToKwjIbcw==",
+ "version": "5.48.0",
+ "resolved": "https://registry.npmjs.org/carbon-components-angular/-/carbon-components-angular-5.48.0.tgz",
+ "integrity": "sha512-NZwpKBKgkgaR51S0Pm16MvashO4g8B+dzGeNE8l/RYRWXpVDLShR6YnBc80t2iMtTolxGiPwHmzpyMieVtIGLg==",
"hasInstallScript": true,
"dependencies": {
"@carbon/icon-helpers": "10.37.0",
"@floating-ui/dom": "1.6.3",
"@ibm/telemetry-js": "^1.5.0",
"flatpickr": "4.6.13",
+ "lodash-es": "4.17.21",
"tslib": "2.3.0"
},
"peerDependencies": {
"@types/file-saver": "2.0.1",
"async-mutex": "0.2.4",
"bootstrap": "5.2.3",
- "carbon-components-angular": "5.25.1",
+ "carbon-components-angular": "5.48.0",
"chart.js": "4.4.0",
"chartjs-adapter-moment": "1.0.1",
"detect-browser": "5.2.0",
-import { Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core';
+import {
+ AfterViewInit,
+ ChangeDetectorRef,
+ Component,
+ Inject,
+ OnDestroy,
+ OnInit,
+ Optional
+} from '@angular/core';
import { UntypedFormControl, UntypedFormGroup, ValidatorFn, Validators } from '@angular/forms';
import { BaseModal } from 'carbon-components-angular';
templateUrl: './bootstrap-create-modal.component.html',
styleUrls: ['./bootstrap-create-modal.component.scss']
})
-export class BootstrapCreateModalComponent extends BaseModal implements OnDestroy, OnInit {
+export class BootstrapCreateModalComponent
+ extends BaseModal
+ implements OnDestroy, OnInit, AfterViewInit {
pools: any[] = [];
token: string;
constructor(
private rbdMirroringService: RbdMirroringService,
private taskWrapper: TaskWrapperService,
+ private changeDetectorRef: ChangeDetectorRef,
@Inject('siteName') @Optional() public siteName?: string
) {
this.createForm();
}
+ ngAfterViewInit(): void {
+ this.changeDetectorRef.detectChanges();
+ }
+
createForm() {
this.createBootstrapForm = new CdFormGroup({
siteName: new UntypedFormControl('', {
-import { Component, Inject, OnInit, Optional } from '@angular/core';
+import {
+ AfterViewInit,
+ ChangeDetectorRef,
+ Component,
+ Inject,
+ OnInit,
+ Optional
+} from '@angular/core';
import { FormControl, Validators } from '@angular/forms';
import { OperatorFunction, Observable, of } from 'rxjs';
import { debounceTime, distinctUntilChanged, switchMap, catchError } from 'rxjs/operators';
templateUrl: './cephfs-auth-modal.component.html',
styleUrls: ['./cephfs-auth-modal.component.scss']
})
-export class CephfsAuthModalComponent extends CdForm implements OnInit {
+export class CephfsAuthModalComponent extends CdForm implements OnInit, AfterViewInit {
subvolumeGroup: string;
subvolume: string;
isDefaultSubvolumeGroup = false;
private cephfsService: CephfsService,
private taskWrapper: TaskWrapperService,
private modalService: ModalCdsService,
+ private changeDetectorRef: ChangeDetectorRef,
@Optional() @Inject('fsName') public fsName: string,
@Optional() @Inject('id') public id: number
this.resource = $localize`access`;
}
+ ngAfterViewInit(): void {
+ this.changeDetectorRef.detectChanges();
+ }
+
ngOnInit() {
this.directoryStore.loadDirectories(this.id, '/', 3);
this.createForm();
CdValidators.custom(
'required',
(rule: CrushRule) =>
- this.isReplicated && this.info.crush_rules_replicated.length > 0 && !rule
+ this.isReplicated && this.info?.crush_rules_replicated?.length > 0 && !rule
)
]
}),
<div class="table-scroller">
<cd-table #table
- [data]="tableData"
+ [data]="tableData || []"
[columns]="columns"
columnMode="flex"
[toolHeader]="false"
if (this.limit === 0) {
this.model.currentPage = 1;
- this.model.pageLength = filteredData.length;
+ this.model.pageLength = filteredData.length || 1;
this._dataset.next(filteredData);
return;
}