From 76577a0335789a07186e3dd3c2c3ffbe5cf1851b Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 7 Apr 2026 13:54:22 +0300 Subject: [PATCH] Refine add item dialog, add rule chain IoT Hub integration, UI improvements - Add item dialog: use mat-toolbar/mat-dialog-content/mat-dialog-actions pattern - Dialog content width 1000px at gt-md, border-top on actions - Browse add mode: hide top border, add padding-bottom to results, responsive 2-col regular / 1-col compact at gt-sm - Item card add mode: disable creator navigation (label only, no hover) - Item detail dialog add mode: creator as label (primary color, no click) - Add "Add from IoT Hub" to rule chains page (tenant/edges scope) - Remove unnecessary table updateData before navigation - Browse filters: no padding-bottom/margin-bottom in add mode --- .../iot-hub-add-item-dialog.component.html | 22 ++++++++---- .../iot-hub-add-item-dialog.component.scss | 35 ++++++------------- .../iot-hub/iot-hub-browse.component.html | 2 +- .../iot-hub/iot-hub-browse.component.scss | 34 +++++++++++++++++- .../iot-hub/iot-hub-item-card.component.html | 4 +-- .../iot-hub/iot-hub-item-card.component.scss | 22 +++++++----- .../iot-hub-item-detail-dialog.component.html | 4 +-- .../iot-hub-item-detail-dialog.component.scss | 9 +++-- .../dashboards-table-config.resolver.ts | 7 ++-- .../rulechains-table-config.resolver.ts | 31 ++++++++++++++++ 10 files changed, 118 insertions(+), 52 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.html index 22a0206f7a..2d1514a5d6 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.html @@ -15,14 +15,17 @@ limitations under the License. --> -
-
+
+

{{ getTitle() }}

- -
-
+ +
@if (isInstalling) {
@@ -36,4 +39,11 @@ (addItem)="onAddItem($event)">
-
+
+ +
+ diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss index 6f8a6cfc2a..66fc802b9b 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-add-item-dialog.component.scss @@ -14,34 +14,21 @@ * limitations under the License. */ -.tb-iot-hub-add-item-dialog { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} +@import "../../../../../scss/constants"; -.tb-iot-hub-add-item-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 16px 24px; - border-bottom: 1px solid rgba(0, 0, 0, 0.12); - flex-shrink: 0; +:host-context(.mat-mdc-dialog-container) { + .mat-mdc-dialog-content { + position: relative; + padding: 0; - h2 { - margin: 0; - font-size: 20px; - font-weight: 500; - line-height: 28px; - color: rgba(0, 0, 0, 0.87); + @media #{$mat-gt-md} { + width: 1000px; + } } -} -.tb-iot-hub-add-item-content { - flex: 1; - overflow: hidden; - position: relative; + .mat-mdc-dialog-actions { + border-top: 1px solid rgba(0, 0, 0, 0.12); + } } .tb-iot-hub-add-item-loading { diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.html index d510bfc887..eab3d4d501 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.html +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.html @@ -15,7 +15,7 @@ limitations under the License. --> -
+