From 89cef08aa5344b04173e990b9b079ace4ce71284 Mon Sep 17 00:00:00 2001 From: Pedro Gonzalez Gomez Date: Fri, 19 Jan 2024 06:40:05 +0100 Subject: [PATCH] mgr/dashboard: remove bucket policy add a button on the bucket form to clear the bucket policy Fixes: https://tracker.ceph.com/issues/64096 Signed-off-by: Pedro Gonzalez Gomez (cherry picked from commit ae367352c7467f6ae3135fed154e89007e848347) --- .../rgw/rgw-bucket-form/rgw-bucket-form.component.html | 8 ++++++++ .../ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html index eef66a6da60b4..77cd69934dc24 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html @@ -430,6 +430,14 @@ Invalid json text +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts index f7015f609f68b..e5267e357c1cd 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts @@ -385,6 +385,12 @@ export class RgwBucketFormComponent extends CdForm implements OnInit, AfterViewC window.open(url, '_blank'); } + clearBucketPolicy() { + this.bucketForm.get('bucket_policy').setValue('{}'); + this.bucketForm.markAsDirty(); + this.bucketForm.updateValueAndValidity(); + } + openConfigModal() { const modalRef = this.modalService.show(RgwConfigModalComponent, null, { size: 'lg' }); modalRef.componentInstance.configForm -- 2.39.5