From def7b203ef642db3c2022f1b10b7b98ce351b1e1 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 28 Apr 2023 14:42:08 +0300 Subject: [PATCH 1/5] UI: Add copy button for attribute table cell --- .../attribute/attribute-table.component.html | 26 +++++++++++++++++-- .../assets/locale/locale.constant-en_US.json | 4 ++- 2 files changed, 27 insertions(+), 3 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 089db1e98d..a2d230bde9 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 @@ -161,7 +161,18 @@ {{ 'attribute.key' | translate }} - {{ attribute.key }} +
+ {{ attribute.key }} + + +
@@ -170,7 +181,18 @@ class="tb-value-cell" (click)="editAttribute($event, attribute)">
- {{attribute.value | tbJson}} +
+ {{attribute.value | tbJson}} + + +
edit 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 3aac9e1909..528fbb36c3 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -691,7 +691,9 @@ "selected-attributes": "{ count, plural, =1 {1 attribute} other {# attributes} } selected", "selected-telemetry": "{ count, plural, =1 {1 telemetry unit} other {# telemetry units} } selected", "no-attributes-text": "No attributes found", - "no-telemetry-text": "No telemetry found" + "no-telemetry-text": "No telemetry found", + "copy-key": "Copy key", + "copy-value": "Copy value" }, "api-usage": { "api-features": "API features", From a8d5e276d3c9f9e54356a75271012e6e633d6666 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 28 Apr 2023 17:53:59 +0300 Subject: [PATCH 2/5] UI: Fixed for long key and value --- .../components/attribute/attribute-table.component.html | 8 ++++---- .../components/attribute/attribute-table.component.scss | 5 +++++ 2 files changed, 9 insertions(+), 4 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 a2d230bde9..e056140b71 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 @@ -162,7 +162,7 @@ {{ 'attribute.key' | translate }}
- {{ attribute.key }} + {{ attribute.key }} -
-
- {{attribute.value | tbJson}} +
+
+ {{attribute.value | tbJson}} Date: Fri, 28 Apr 2023 18:10:05 +0300 Subject: [PATCH 3/5] UI: Refactoring --- .../home/components/attribute/attribute-table.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e056140b71..5cacb555b9 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 @@ -181,7 +181,7 @@ class="tb-value-cell" (click)="editAttribute($event, attribute)">
-
+
{{attribute.value | tbJson}} Date: Mon, 1 May 2023 16:26:49 +0300 Subject: [PATCH 4/5] UI: Copy button visible on hover --- .../attribute/attribute-table.component.html | 6 ++++-- .../attribute/attribute-table.component.scss | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 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 5cacb555b9..0a57bfef9b 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 @@ -161,9 +161,10 @@ {{ 'attribute.key' | translate }} -
+
{{ attribute.key }}
-
+
{{attribute.value | tbJson}} Date: Tue, 2 May 2023 09:19:53 +0300 Subject: [PATCH 5/5] UI: Refactoring --- .../components/attribute/attribute-table.component.html | 8 ++++---- .../components/attribute/attribute-table.component.scss | 2 +- 2 files changed, 5 insertions(+), 5 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 0a57bfef9b..61dc5bf013 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 @@ -160,8 +160,8 @@ {{ 'attribute.key' | translate }} - -
+ +
{{ attribute.key }} {{ 'attribute.value' | translate }}
-
+
{{attribute.value | tbJson}}