From b652caf61401e9f3f17545965375d8e54a5c1a72 Mon Sep 17 00:00:00 2001 From: "AGRINOMIXLLC\\jkubicki" Date: Thu, 16 Apr 2026 12:22:30 -0400 Subject: [PATCH] UI: Added maxLength parameter to tbJson pipe for truncating large attribute values Added optional maxLength parameter to the tbJson pipe. When provided, truncates the stringified result and appends an ellipsis character. Updated attribute table to use tbJson:300 for key and value display while preserving full untruncated data for copy-to-clipboard. --- .../attribute/attribute-table.component.html | 4 ++-- ui-ngx/src/app/shared/pipe/tbJson.pipe.ts | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html index 9ac6ac1846..0ed2207b7f 100644 --- a/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html +++ b/ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html @@ -170,7 +170,7 @@ {{ 'attribute.key' | translate }}
- {{ attribute.key }} + {{ attribute.key | tbJson:300 }}
- {{attribute.value | tbJson}} + {{attribute.value | tbJson:300}} @if (attribute.value !== '') { 0 && result && result.length > maxLength) { + return result.slice(0, maxLength) + '\u2026'; + } + return result; } }