From: Tiago Melo Date: Fri, 24 May 2019 00:31:45 +0000 (+0000) Subject: mgr/dashboard: Fix NFS clients squash/access_type default values X-Git-Tag: v15.1.0~2619^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28235%2Fhead;p=ceph.git mgr/dashboard: Fix NFS clients squash/access_type default values Fixes: https://tracker.ceph.com/issues/40012 Signed-off-by: Tiago Melo --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html index fa75da44af4e..b5a05c75f1c8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.html @@ -60,7 +60,7 @@ name="access_type" id="access_type" formControlName="access_type"> - + @@ -81,7 +81,7 @@ name="squash" id="squash" formControlName="squash"> - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts index 986dd5a4f6d2..a549deb0445c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts @@ -52,8 +52,8 @@ export class NfsFormClientComponent { addresses: new FormControl('', { validators: [Validators.required, Validators.pattern(REGEX_LIST_IP)] }), - access_type: new FormControl(this.form.getValue('access_type')), - squash: new FormControl(this.form.getValue('squash')) + access_type: new FormControl(''), + squash: new FormControl('') }); clients.push(fg); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts index 124214f31315..e234209638a0 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts @@ -542,6 +542,14 @@ export class NfsFormComponent implements OnInit { } else { client.addresses = []; } + + if (!client.squash) { + client.squash = requestModel.squash; + } + + if (!client.access_type) { + client.access_type = requestModel.access_type; + } }); if (requestModel.security_label === false || requestModel.fsal.name === 'RGW') {