]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-user-form / rgw-user-form.component.ts
index 77321d6578b8ba572ba31b78941c9695a7fb781b..c1bf31244eae5df24f0f530cbd61a17980eaa0b8 100644 (file)
@@ -705,4 +705,17 @@ export class RgwUserFormComponent implements OnInit {
     result = _.uniq(result);
     return result;
   }
+
+  onMaxBucketsModeChange(mode: string) {
+    if (mode === '1') {
+      // If 'Custom' mode is selected, then ensure that the form field
+      // 'Max. buckets' contains a valid value. Set it to default if
+      // necessary.
+      if (!this.userForm.get('max_buckets').valid) {
+        this.userForm.patchValue({
+          max_buckets: 1000
+        });
+      }
+    }
+  }
 }