]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Hide maintenance option on expand cluster 46702/head
authorNizamudeen A <nia@redhat.com>
Wed, 15 Jun 2022 18:52:12 +0000 (00:22 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 10 Aug 2022 08:25:15 +0000 (13:55 +0530)
Fixes: https://tracker.ceph.com/issues/56070
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts

index 7fbc6718576538f84d836888a02e9b9709473aea..750fef894fb9508756adb17bdd58e8236956f97e 100644 (file)
@@ -45,8 +45,6 @@
           class="cd-header">Host Details</legend>
   <cd-hosts [hiddenColumns]="['services', 'status']"
             [hideToolHeader]="true"
-            [hideTitle]="true"
-            [hideSubmitBtn]="true"
             [hasTableDetails]="false"
             [showGeneralActionsOnly]="true">
   </cd-hosts>
index d7ab567cf37e7fe4f49e8660145ad045d67b8a7f..82429e6dda4e27ce96a1236694c379422a4435d1 100644 (file)
@@ -43,8 +43,7 @@
               i18n>Add Hosts</h4>
           <br>
           <cd-hosts [hiddenColumns]="['services']"
-                    [hideTitle]="true"
-                    [hideSubmitBtn]="true"
+                    [hideMaintenance]="true"
                     [hasTableDetails]="false"
                     [showGeneralActionsOnly]="true"></cd-hosts>
         </div>
index 66fe42f7fa845d11759751ee0368a9cd45c79269..af09b9a4fefa6e68115fb829f0f86d27a9dcbe5a 100644 (file)
@@ -80,7 +80,8 @@
           </div>
 
           <!-- Maintenance Mode -->
-          <div class="form-group row">
+          <div class="form-group row"
+               *ngIf="!hideMaintenance">
             <div class="cd-col-form-offset">
               <div class="custom-control custom-checkbox">
                 <input class="custom-control-input"
index 6bfb79d679c8884e36d2138deabc5c4ac6b58aa6..9031ca5f78ad08c992d6c2684dad18b8dc179b54 100644 (file)
@@ -32,6 +32,7 @@ export class HostFormComponent extends CdForm implements OnInit {
   pageURL: string;
   hostPattern = false;
   labelsOption: Array<SelectOption> = [];
+  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)
     });
   }
 
index cabbaec726cb28f835d634a72004e0d9fa3af78e..73459a364d50ef2dba6c60c7d233cce3d0818cde 100644 (file)
@@ -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)
       },
       {