From f6584ab8dd5f4806533be0d7b31ae81c11b56244 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 18 May 2023 13:44:01 +0530 Subject: [PATCH] mgr/dashboard: more visibility for keys Fixes: https://tracker.ceph.com/issues/61239 Signed-off-by: Nizamudeen A (cherry picked from commit 5ac61e925145154c6616a7630b3fc9643311ed7b) --- .../rgw-user-details.component.html | 311 +++++++++--------- .../rgw-user-details.component.spec.ts | 27 +- 2 files changed, 150 insertions(+), 188 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html index 992a98ac83f..27162404a62 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html @@ -1,162 +1,14 @@ - + + + + Details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tenant{{ user.tenant }}
User ID{{ user.user_id }}
Username{{ user.uid }}
Full name{{ user.display_name }}
Email address{{ user.email }}
Suspended{{ user.suspended | booleanText }}
System{{ user.system === 'true' | booleanText }}
Maximum buckets{{ user.max_buckets | map:maxBucketsMap }}
Subusers +
+ {{ subuser.id }} ({{ subuser.permissions }}) +
+
Capabilities +
+ {{ cap.type }} ({{ cap.perm }}) +
+
MFAs(Id){{ user.mfa_ids | join}}
+ + +
+ User quota + + + + + + + + + + + + + + + + + + + +
Enabled{{ user.user_quota.enabled | booleanText }}
Maximum size-Unlimited + {{ user.user_quota.max_size | dimlessBinary }} +
Maximum objects-Unlimited + {{ user.user_quota.max_objects }} +
+
-
+ +
+ Bucket quota + + + + + + + + + + + + + + + + + + + +
Enabled{{ user.bucket_quota.enabled | booleanText }}
Maximum size-Unlimited + {{ user.bucket_quota.max_size | dimlessBinary }} +
Maximum objects-Unlimited + {{ user.bucket_quota.max_objects }} +
+
+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.spec.ts index 62519cdf478..7b203eb9cca 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.spec.ts @@ -5,8 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from '~/app/shared/shared.module'; -import { configureTestBed, TabHelper } from '~/testing/unit-test-helper'; -import { RgwUserS3Key } from '../models/rgw-user-s3-key'; +import { configureTestBed } from '~/testing/unit-test-helper'; import { RgwUserDetailsComponent } from './rgw-user-details.component'; describe('RgwUserDetailsComponent', () => { @@ -27,30 +26,6 @@ describe('RgwUserDetailsComponent', () => { it('should create', () => { expect(component).toBeTruthy(); - - const tabs = TabHelper.getTextContents(fixture); - expect(tabs).toContain('Details'); - expect(tabs).not.toContain('Keys'); - }); - - it('should show "Details" tab', () => { - component.selection = { uid: 'myUsername' }; - fixture.detectChanges(); - - const tabs = TabHelper.getTextContents(fixture); - expect(tabs).toContain('Details'); - expect(tabs).not.toContain('Keys'); - }); - - it('should show "Keys" tab', () => { - const s3Key = new RgwUserS3Key(); - component.selection = { keys: [s3Key] }; - component.ngOnChanges(); - fixture.detectChanges(); - - const tabs = TabHelper.getTextContents(fixture); - expect(tabs).toContain('Details'); - expect(tabs).toContain('Keys'); }); it('should show correct "System" info', () => { -- 2.39.5