Skip to content

Commit 55d72f3

Browse files
author
Dnyaneshwari
committed
mgr/dashboard: NFS - Fix Edit NFS export request
Fixes: https://tracker.ceph.com/issues/70284 Signed-off-by: Dnyaneshwari Talwekar <[email protected]>
1 parent 1bc1c5e commit 55d72f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
</div>
154154

155155
<div class="form-item"
156-
*ngIf="storageBackend === 'CEPH' && nfsForm.getValue('fsal').fs_name">
156+
*ngIf="storageBackend === 'CEPH' && nfsForm.getValue('fsal').fs_name && !this.isEdit">
157157
<cds-select formControlName="subvolume_group"
158158
name="subvolume_group"
159159
for="subvolume_group"
@@ -174,7 +174,7 @@
174174
</div>
175175

176176
<div class="form-group row"
177-
*ngIf="storageBackend === 'CEPH' && nfsForm.getValue('fsal').fs_name">
177+
*ngIf="storageBackend === 'CEPH' && nfsForm.getValue('fsal').fs_name && !this.isEdit">
178178
<cds-select formControlName="subvolume"
179179
name="subvolume"
180180
for="subvolume"

src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ export class NfsFormComponent extends CdForm implements OnInit {
150150
}
151151
);
152152
this.nfsForm.get('cluster_id').disable();
153+
this.nfsForm.get('fsal').disable();
153154
this.nfsForm.get('path').disable();
154-
this.nfsForm.get('fsal.user_id').disable();
155155
} else {
156156
this.action = this.actionLabels.CREATE;
157157
this.route.params.subscribe(
@@ -491,7 +491,7 @@ export class NfsFormComponent extends CdForm implements OnInit {
491491
setBucket() {
492492
this.nfsForm.get('path').enable();
493493
this.nfsForm.get('fsal.user_id').setValue('');
494-
this.nfsForm.get('fsal.user_id').disable();
494+
this.nfsForm.get('fsal').disable();
495495

496496
this.setPathValidation();
497497
}
@@ -617,12 +617,12 @@ export class NfsFormComponent extends CdForm implements OnInit {
617617

618618
private buildRequest() {
619619
const requestModel: any = _.cloneDeep(this.nfsForm.value);
620-
620+
requestModel.fsal = this.nfsForm.get('fsal').value;
621621
if (this.isEdit) {
622622
requestModel.export_id = _.parseInt(this.export_id);
623+
requestModel.path = this.nfsForm.get('path').value;
623624
if (requestModel.fsal.name === SUPPORTED_FSAL.RGW) {
624625
requestModel.fsal.user_id = this.nfsForm.getValue('fsal').user_id;
625-
requestModel.path = this.nfsForm.getValue('path');
626626
}
627627
}
628628

0 commit comments

Comments
 (0)