Skip to content

Commit 1ffb12f

Browse files
committed
mgr/dashboard: Fix RGW bucket edit issue
Commit f21d0da introduced an error in bucket edit action. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1647154 RHCS: 3.2 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
1 parent d7cd666 commit 1ffb12f

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ export class RgwBucketFormComponent implements OnInit {
5151
if (!params.hasOwnProperty('bucket')) {
5252
return;
5353
}
54-
params.bucket = decodeURIComponent(params.bucket);
54+
const bucket = decodeURIComponent(params.bucket);
5555
this.loading = true;
5656
// Load the bucket data in 'edit' mode.
5757
this.editing = true;
58-
this.rgwBucketService.get(params.bucket).subscribe((resp: object) => {
58+
this.rgwBucketService.get(bucket).subscribe((resp: object) => {
5959
this.loading = false;
6060
// Get the default values.
6161
const defaults = _.clone(this.bucketForm.value);

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class RgwBucketListComponent {
4747
}
4848
];
4949
const getBucketUri = () =>
50-
this.selection.first() && `${encodeURI(this.selection.first().bucket)}`;
50+
this.selection.first() && `${encodeURIComponent(this.selection.first().bucket)}`;
5151
const addAction: CdTableAction = {
5252
permission: 'create',
5353
icon: 'fa-plus',

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ export class RgwUserFormComponent implements OnInit {
154154
if (!params.hasOwnProperty('uid')) {
155155
return;
156156
}
157+
const uid = decodeURIComponent(params.uid);
157158
this.loading = true;
158159
// Load the user data in 'edit' mode.
159160
this.editing = true;
160161
// Load the user and quota information.
161162
const observables = [];
162-
observables.push(this.rgwUserService.get(params.uid));
163-
observables.push(this.rgwUserService.getQuota(params.uid));
163+
observables.push(this.rgwUserService.get(uid));
164+
observables.push(this.rgwUserService.getQuota(uid));
164165
observableForkJoin(observables).subscribe(
165166
(resp: any[]) => {
166167
this.loading = false;

src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export class RgwUserListComponent {
6363
flexGrow: 1
6464
}
6565
];
66-
const getUserUri = () => this.selection.first() && this.selection.first().user_id;
66+
const getUserUri = () =>
67+
this.selection.first() && `${encodeURIComponent(this.selection.first().user_id)}`;
6768
const addAction: CdTableAction = {
6869
permission: 'create',
6970
icon: 'fa-plus',

0 commit comments

Comments
 (0)