]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.ts
import ceph quincy 17.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / rbd-snapshot-form / rbd-snapshot-form-modal.component.ts
index 83296866c1af7a48be7da44969422493c719873f..d5861163f198b836cbb4221bb91075248c929a0e 100644 (file)
@@ -22,6 +22,7 @@ export class RbdSnapshotFormModalComponent {
   namespace: string;
   imageName: string;
   snapName: string;
+  mirroring: string;
 
   snapshotForm: CdFormGroup;
 
@@ -53,7 +54,11 @@ export class RbdSnapshotFormModalComponent {
 
   setSnapName(snapName: string) {
     this.snapName = snapName;
-    this.snapshotForm.get('snapshotName').setValue(snapName);
+    if (this.mirroring !== 'snapshot') {
+      this.snapshotForm.get('snapshotName').setValue(snapName);
+    } else {
+      this.snapshotForm.get('snapshotName').clearValidators();
+    }
   }
 
   /**