diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index e31e22e0fe..50978662df 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -459,7 +459,7 @@ export class EntityService { entitiesObservable = this.queueService.getQueueStatistics(pageLink, config); break; case EntityType.OAUTH2_CLIENT: - pageLink.sortOrder.property = 'createdTime'; + pageLink.sortOrder.property = 'title'; entitiesObservable = this.oauth2Service.findTenantOAuth2ClientInfos(pageLink, config); break; } diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.html b/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.html index 45b35c89c4..df43a595fe 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.html @@ -23,6 +23,9 @@ {{ 'admin.oauth2.client-title-required' | translate }} + + {{ 'admin.oauth2.client-title-max-length' | translate }} +
@@ -67,7 +70,7 @@
- + admin.oauth2.advanced-settings @@ -162,7 +165,7 @@
admin.oauth2.scope - + {{scope}} diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.ts b/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.ts index cf60b3ed51..2662b97c65 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client.component.ts @@ -103,6 +103,7 @@ export class ClientComponent extends EntityComponent, protected translate: TranslateService, @@ -126,7 +127,7 @@ export class ClientComponent extends EntityComponent { - if (domain === 'CUSTOM') { + if (domain === 'CUSTOM' && (this.createNewDialog || this.isEdit || this.isAdd)) { basicGroup.get('tenantNamePattern').enable(); } else { basicGroup.get('tenantNamePattern').disable(); @@ -345,7 +346,10 @@ export class ClientComponent extends EntityComponent('createdTime', 'common.created-time', this.datePipe, '170px'), - new EntityTableColumn('title', 'admin.oauth2.title', '170px'), + new EntityTableColumn('title', 'admin.oauth2.title', '35%'), new EntityTableColumn('providerName', 'admin.oauth2.provider', '170px'), - new EntityTableColumn('platforms', 'admin.oauth2.allowed-platforms', '100%', + new EntityTableColumn('platforms', 'admin.oauth2.allowed-platforms', '170px', (clientInfo) => { return clientInfo.platforms && clientInfo.platforms.length ? clientInfo.platforms.map(platform => this.translate.instant(platformTypeTranslations.get(platform))).join(', ') : diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-config.resolver.ts index 4bccc41dc7..7680a5d502 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-config.resolver.ts @@ -54,8 +54,6 @@ export class DomainTableConfigResolver implements Resolve('createdTime', 'common.created-time', this.datePipe, '170px'), diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app-table-config.resolver.ts index 7585cfff46..625a0ad9b4 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app-table-config.resolver.ts @@ -55,8 +55,6 @@ export class MobileAppTableConfigResolver implements Resolve('createdTime', 'common.created-time', this.datePipe, '170px'), @@ -134,8 +132,8 @@ export class MobileAppTableConfigResolver implements Resolve 40) { - text = `${text.slice(0, 40)}…`; + if (text.length > 35) { + text = `${text.slice(0, 35)}…`; } return text; } diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.html b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.html index f280592925..afec8125c3 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.html @@ -25,6 +25,9 @@ {{ 'admin.oauth2.mobile-package-unique' | translate }} + + {{ 'admin.oauth2.mobile-package-max-length' | translate }} +
diff --git a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.ts b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.ts index 2cca292fc3..9f90a96621 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/oauth2/mobile-apps/mobile-app.component.ts @@ -54,7 +54,7 @@ export class MobileAppComponent extends EntityComponent { buildForm(entity: MobileAppInfo): UntypedFormGroup { return this.fb.group({ - pkgName: [entity?.pkgName ? entity.pkgName : '', [Validators.required]], + pkgName: [entity?.pkgName ? entity.pkgName : '', [Validators.required, Validators.maxLength(255)]], appSecret: [entity?.appSecret ? entity.appSecret : btoa(randomAlphanumeric(64)), [Validators.required, this.base64Format]], oauth2Enabled: isDefinedAndNotNull(entity?.oauth2Enabled) ? entity.oauth2Enabled : true, diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index d9259eec78..f873650b26 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -234,14 +234,15 @@ "delete-mobile-app-text": "Be careful, after the confirmation the mobile application and all related data will become unrecoverable.", "title": "Title", "client-title-required": "Title is required", + "client-title-max-length": "Title should be less than 100", "advanced-settings": "Advanced settings", "domain-details": "Domain details", "no-domains": "No domains found", "search-domains": "Search domains", "mobile-app-details": "Mobile application details", "add-mobile-app": "Add mobile application", - "no-mobile-apps": "Search mobile applications", - "search-mobile-apps": "No mobile applications found", + "no-mobile-apps": "No mobile applications found", + "search-mobile-apps": "Search mobile applications", "send-token": "Send token", "create-new": "Create new", "client-authentication-method": "Client authentication method", @@ -315,6 +316,7 @@ "mobile-package-placeholder": "Ex.: my.example.app", "mobile-package-hint": "For Android: your own unique Application ID. For iOS: Product bundle identifier.", "mobile-package-unique": "Application package must be unique.", + "mobile-package-max-length": "Application package should be less than 256", "mobile-app-secret": "Application secret", "mobile-app-secret-hint": "Base64 encoded string representing at least 512 bits of data.", "mobile-app-secret-required": "Application secret is required.",