From: Nizamudeen A Date: Wed, 15 Jun 2022 18:52:12 +0000 (+0530) Subject: mgr/dashboard: Hide maintenance option on expand cluster X-Git-Tag: v17.2.4~71^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82cd8a8fc3797bf943f8d73ae28f1cc7f518c711;p=ceph.git mgr/dashboard: Hide maintenance option on expand cluster Fixes: https://tracker.ceph.com/issues/56070 Signed-off-by: Nizamudeen A (cherry picked from commit d66bfe04b8e56e3fe1019ba78e1f4b250458ce71) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html index 7fbc67185765..750fef894fb9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html @@ -45,8 +45,6 @@ class="cd-header">Host Details diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html index d7ab567cf37e..82429e6dda4e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html @@ -43,8 +43,7 @@ i18n>Add Hosts
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html index 66fe42f7fa84..af09b9a4fefa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html @@ -80,7 +80,8 @@ -
+
= []; + hideMaintenance: boolean; messages = new SelectMessages({ empty: $localize`There are no labels.`, @@ -91,7 +92,7 @@ export class HostFormComponent extends CdForm implements OnInit { validators: [CdValidators.ip()] }), labels: new FormControl([]), - maintenance: new FormControl({ value: false, disabled: this.pageURL !== 'hosts' }) + maintenance: new FormControl(false) }); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts index cabbaec726cb..73459a364d50 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts @@ -62,10 +62,7 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit hiddenColumns: string[] = []; @Input() - hideTitle = false; - - @Input() - hideSubmitBtn = false; + hideMaintenance = false; @Input() hasTableDetails = true; @@ -130,7 +127,9 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit click: () => this.router.url.includes('/hosts') ? this.router.navigate([BASE_URL, { outlets: { modal: [URLVerbs.ADD] } }]) - : (this.bsModalRef = this.modalService.show(HostFormComponent)), + : (this.bsModalRef = this.modalService.show(HostFormComponent, { + hideMaintenance: this.hideMaintenance + })), disable: (selection: CdTableSelection) => this.getDisable('add', selection) }, {