]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / hosts / host-form / host-form.component.ts
index 9031ca5f78ad08c992d6c2684dad18b8dc179b54..240a0a7bebbd1306779c1f2157f25efa99382913 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { FormControl, Validators } from '@angular/forms';
+import { UntypedFormControl, Validators } from '@angular/forms';
 import { Router } from '@angular/router';
 
 import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
@@ -12,6 +12,7 @@ import { ActionLabelsI18n, URLVerbs } from '~/app/shared/constants/app.constants
 import { CdForm } from '~/app/shared/forms/cd-form';
 import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
 import { CdValidators } from '~/app/shared/forms/cd-validators';
+import { CdTableFetchDataContext } from '~/app/shared/models/cd-table-fetch-data-context';
 import { FinishedTask } from '~/app/shared/models/finished-task';
 import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
 
@@ -57,7 +58,8 @@ export class HostFormComponent extends CdForm implements OnInit {
       this.pageURL = 'hosts';
     }
     this.createForm();
-    this.hostService.list('false').subscribe((resp: any[]) => {
+    const hostContext = new CdTableFetchDataContext(() => undefined);
+    this.hostService.list(hostContext.toParams(), 'false').subscribe((resp: any[]) => {
       this.hostnames = resp.map((host) => {
         return host['hostname'];
       });
@@ -80,7 +82,7 @@ export class HostFormComponent extends CdForm implements OnInit {
 
   private createForm() {
     this.hostForm = new CdFormGroup({
-      hostname: new FormControl('', {
+      hostname: new UntypedFormControl('', {
         validators: [
           Validators.required,
           CdValidators.custom('uniqueName', (hostname: string) => {
@@ -88,11 +90,11 @@ export class HostFormComponent extends CdForm implements OnInit {
           })
         ]
       }),
-      addr: new FormControl('', {
+      addr: new UntypedFormControl('', {
         validators: [CdValidators.ip()]
       }),
-      labels: new FormControl([]),
-      maintenance: new FormControl(false)
+      labels: new UntypedFormControl([]),
+      maintenance: new UntypedFormControl(false)
     });
   }