From: Nizamudeen A Date: Tue, 29 Aug 2023 14:16:07 +0000 (+0530) Subject: mgr/dashboard: fix cephfs create form validator X-Git-Tag: v19.0.0~583^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d8208693d5b9a94fd24dbffcdb45fe67d4164b3b;p=ceph.git mgr/dashboard: fix cephfs create form validator dashboard was allowing to create a filesystem with / in its name but the cli throws out error in doing so. And the created volume in dashboard just gets ended up as a stale volume Fixes: https://tracker.ceph.com/issues/62628 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.html index dc2b1fd0bbc31..8da9a74a50664 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.html @@ -34,7 +34,7 @@ i18n>This field is required! Volume name can only contain letters, numbers, '.', '-', '_' or '/'. + i18n>File System name can only contain letters, numbers, '.', '-' or '_' diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts index 8df74f149d0f7..0e607e9a02b94 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts @@ -80,7 +80,7 @@ export class CephfsVolumeFormComponent extends CdForm implements OnInit { }); this.form = this.formBuilder.group({ name: new FormControl('', { - validators: [Validators.pattern(/^[.A-Za-z0-9_/-]+$/), Validators.required] + validators: [Validators.pattern(/^[.A-Za-z0-9_-]+$/), Validators.required] }), placement: ['hosts'], hosts: [[]],