From e994a9d5385fb49ed0184ec2e1e41b2218876f7f Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Thu, 13 Nov 2025 12:38:19 +0200 Subject: [PATCH 1/3] added length validation for version control name --- .../home/components/vc/entity-version-create.component.html | 3 +++ .../home/components/vc/entity-version-create.component.ts | 2 +- ui-ngx/src/assets/locale/locale.constant-en_US.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html index da4c31a1b8..ca1ddad695 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html @@ -37,6 +37,9 @@ createVersionFormGroup.get('versionName').hasError('pattern')"> {{ 'version-control.version-name-required' | translate }} + + {{ 'version-control.version-name-max-length' | translate }} + {{ 'version-control.export-credentials' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts index 2042b7fdb6..3427bf0b58 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts @@ -86,7 +86,7 @@ export class EntityVersionCreateComponent extends PageComponent implements OnIni this.createVersionFormGroup = this.fb.group({ branch: [this.branch, [Validators.required]], versionName: [this.translate.instant('version-control.default-create-entity-version-name', - {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/)]], + {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/), Validators.maxLength(256)]], saveRelations: [false, []], saveAttributes: [true, []], saveCredentials: [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 ec3ef79ef4..979953cd80 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -6723,7 +6723,8 @@ "runtime-failed": "Failed: {{message}}", "auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings.", "rollback-on-error": "Rollback on error", - "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is" + "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is", + "version-name-max-length": "Name should be less than 256" }, "widget": { "widget-library": "Widgets library", From 2d03ee15cafa346f268f9c9829544ef64fc7cf2a Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Fri, 14 Nov 2025 12:28:45 +0200 Subject: [PATCH 2/3] added tooltip to truncate text --- .../home/components/vc/entity-version-create.component.html | 3 --- .../home/components/vc/entity-version-create.component.ts | 2 +- .../home/components/vc/entity-versions-table.component.html | 4 +++- .../home/components/vc/entity-versions-table.component.scss | 5 ++++- ui-ngx/src/assets/locale/locale.constant-en_US.json | 3 +-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html index ca1ddad695..da4c31a1b8 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.html @@ -37,9 +37,6 @@ createVersionFormGroup.get('versionName').hasError('pattern')"> {{ 'version-control.version-name-required' | translate }} - - {{ 'version-control.version-name-max-length' | translate }} - {{ 'version-control.export-credentials' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts index 3427bf0b58..2042b7fdb6 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts +++ b/ui-ngx/src/app/modules/home/components/vc/entity-version-create.component.ts @@ -86,7 +86,7 @@ export class EntityVersionCreateComponent extends PageComponent implements OnIni this.createVersionFormGroup = this.fb.group({ branch: [this.branch, [Validators.required]], versionName: [this.translate.instant('version-control.default-create-entity-version-name', - {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/), Validators.maxLength(256)]], + {entityName: this.entityName}), [Validators.required, Validators.pattern(/(?:.|\s)*\S(&:.|\s)*/)]], saveRelations: [false, []], saveAttributes: [true, []], saveCredentials: [true, []], diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html index e05fa4152c..9d87b724a2 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html @@ -114,7 +114,9 @@ {{ 'version-control.version-name' | translate }} - {{ entityVersion.name }} +
+ {{ entityVersion.name }} +
diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss index 752d250145..1f8dc7921f 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss +++ b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss @@ -55,7 +55,10 @@ } .table-container { - overflow: auto; + overflow: hidden; + .mat-mdc-table { + table-layout: fixed; + } } .tb-entity-table-info{ 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 979953cd80..ec3ef79ef4 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -6723,8 +6723,7 @@ "runtime-failed": "Failed: {{message}}", "auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings.", "rollback-on-error": "Rollback on error", - "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is", - "version-name-max-length": "Name should be less than 256" + "rollback-on-error-hint": "If you have a large amount of entities to restore, consider disabling this option to increase performance.\n Note, if an error occurs over the course of version loading, already persisted entities (with relations, attributes, etc.) will stay as is" }, "widget": { "widget-library": "Widgets library", From 786d20a6cbea4888c71e8123ecc574c5c2cc3487 Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Fri, 14 Nov 2025 19:06:24 +0200 Subject: [PATCH 3/3] fixed max length of name field --- .../home/components/vc/entity-versions-table.component.html | 4 ++-- .../home/components/vc/entity-versions-table.component.scss | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html index 9d87b724a2..ca9f9a4f90 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html +++ b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.html @@ -114,8 +114,8 @@ {{ 'version-control.version-name' | translate }} -
- {{ entityVersion.name }} +
+ {{ entityVersion.name?.length > 256 ? entityVersion.name.substring(0, 256) + '…' : entityVersion.name }}
diff --git a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss index 1f8dc7921f..752d250145 100644 --- a/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss +++ b/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.scss @@ -55,10 +55,7 @@ } .table-container { - overflow: hidden; - .mat-mdc-table { - table-layout: fixed; - } + overflow: auto; } .tb-entity-table-info{