]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard : Group name should be read only when user tries to edit existing nvmeo... 70560/head
authorpujashahu <pshahu@redhat.com>
Mon, 27 Jul 2026 08:05:55 +0000 (13:35 +0530)
committerpujashahu <pshahu@redhat.com>
Mon, 27 Jul 2026 09:14:48 +0000 (14:44 +0530)
Fixes: https://tracker-origin.ceph.com/issues/78685
Signed-off-by: pujaoshahu <pshahu@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-group-form/nvmeof-group-form.component.ts

index df323eb4f44176423318dcc699a51c0fb1a70b2e..5f488596d4519b085278cd434a3ff2b34f43289d 100644 (file)
@@ -42,6 +42,7 @@
               formControlName="groupName"
               cdRequiredField="Gateway group name"
               [invalid]="groupName.isInvalid"
+              [readonly]="editing"
             />
           </cds-text-label>
           <span
index f5226f1c40bf03c374180e93d3e1cd5d6c279664..b03d802813935aec87a4fcc0d28914e47e5b64b4 100644 (file)
@@ -51,17 +51,17 @@ export class NvmeofGroupFormComponent extends CdForm implements OnInit {
   }
 
   ngOnInit() {
-    this.createForm();
-
     this.route.params.subscribe((params) => {
       if (params['name']) {
         this.editing = true;
         this.gatewayGroupName = params['name'];
         this.action = this.actionLabels.EDIT;
+        this.createForm();
         this.loadGatewayGroupData(params['name']);
       } else {
         this.editing = false;
         this.action = this.actionLabels.CREATE;
+        this.createForm();
       }
     });
   }
@@ -109,10 +109,6 @@ export class NvmeofGroupFormComponent extends CdForm implements OnInit {
         encryptionConfigControl.setValue(encryptionKeyControl.value, { emitEvent: false });
       }
     });
-
-    if (this.editing) {
-      this.groupForm.get('groupName')?.disable();
-    }
   }
 
   loadGatewayGroupData(groupName: string) {