]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix cephfs create form validator 53219/head
authorNizamudeen A <nia@redhat.com>
Tue, 29 Aug 2023 14:16:07 +0000 (19:46 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 30 Aug 2023 08:30:49 +0000 (14:00 +0530)
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 <nia@redhat.com>
(cherry picked from commit d8208693d5b9a94fd24dbffcdb45fe67d4164b3b)

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

index dc2b1fd0bbc3133dc8cb577202a6a73d7f593190..8da9a74a50664486f16a2f23101e69013f98d7f8 100644 (file)
@@ -34,7 +34,7 @@
                   i18n>This field is required!</span>
             <span *ngIf="form.showError('name', formDir, 'pattern')"
                   class="invalid-feedback"
-                  i18n>Volume name can only contain letters, numbers, '.', '-', '_' or '/'.</span>
+                  i18n>File System name can only contain letters, numbers, '.', '-' or '_'</span>
           </div>
         </div>
 
index 8df74f149d0f70ec08e77d6db577ecd7b9218a76..0e607e9a02b94df6dcf97807787b264e5d190fbd 100644 (file)
@@ -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: [[]],