From d66bfe04b8e56e3fe1019ba78e1f4b250458ce71 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 16 Jun 2022 00:22:12 +0530 Subject: [PATCH] mgr/dashboard: Hide maintenance option on expand cluster Fixes: https://tracker.ceph.com/issues/56070 Signed-off-by: Nizamudeen A --- .../create-cluster/create-cluster-review.component.html | 2 -- .../cluster/create-cluster/create-cluster.component.html | 3 +-- .../cluster/hosts/host-form/host-form.component.html | 3 ++- .../ceph/cluster/hosts/host-form/host-form.component.ts | 3 ++- .../src/app/ceph/cluster/hosts/hosts.component.ts | 9 ++++----- 5 files changed, 9 insertions(+), 11 deletions(-) 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 7fbc671857653..750fef894fb95 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 d7ab567cf37e7..82429e6dda4e2 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 66fe42f7fa845..af09b9a4fefa6 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 cabbaec726cb2..73459a364d50e 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) }, { -- 2.39.5