From 77283be9d683bf44296ad0538db7f4c16e653623 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Tue, 29 Aug 2023 19:46:07 +0530 Subject: [PATCH] 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 (cherry picked from commit d8208693d5b9a94fd24dbffcdb45fe67d4164b3b) --- .../src/app/ceph/cephfs/cephfs-form/cephfs-form.component.html | 2 +- .../src/app/ceph/cephfs/cephfs-form/cephfs-form.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: [[]], -- 2.39.5