Browse Source

Flex layout replacements. Switch to tailwind.css.

pull/11838/head
Igor Kulikov 2 years ago
parent
commit
e394cb5a43
  1. 26
      ui-ngx/src/app/modules/home/pages/asset/asset.component.html
  2. 34
      ui-ngx/src/app/modules/home/pages/customer/customer.component.html
  3. 38
      ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html
  4. 12
      ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.html
  5. 8
      ui-ngx/src/app/modules/home/pages/dashboard/manage-dashboard-customers-dialog.component.html
  6. 32
      ui-ngx/src/app/modules/home/pages/device/data/snmp-device-transport-configuration.component.html
  7. 30
      ui-ngx/src/app/modules/home/pages/device/device-check-connectivity-dialog.component.html
  8. 4
      ui-ngx/src/app/modules/home/pages/device/device-credentials-dialog.component.html
  9. 36
      ui-ngx/src/app/modules/home/pages/device/device.component.html
  10. 6
      ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html
  11. 58
      ui-ngx/src/app/modules/home/pages/edge/edge.component.html
  12. 30
      ui-ngx/src/app/modules/home/pages/entity-view/entity-view.component.html
  13. 6
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html
  14. 10
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.component.html
  15. 4
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.html
  16. 14
      ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.html
  17. 13
      ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.html
  18. 57
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html
  19. 4
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.html
  20. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html
  21. 26
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
  22. 12
      ui-ngx/src/app/modules/home/pages/notification/settings/notification-setting-form.component.html
  23. 17
      ui-ngx/src/app/modules/home/pages/notification/settings/notification-settings.component.html
  24. 21
      ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-action-button-configuration.component.html
  25. 16
      ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-template-configuration.component.html
  26. 8
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html
  27. 4
      ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.html
  28. 54
      ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.html
  29. 15
      ui-ngx/src/app/modules/home/pages/profile/profile.component.html
  30. 4
      ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html
  31. 4
      ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-link-dialog.component.html
  32. 6
      ui-ngx/src/app/modules/home/pages/rulechain/create-nested-rulechain-dialog.component.html
  33. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.html
  34. 2
      ui-ngx/src/app/modules/home/pages/rulechain/rule-node-link.component.html
  35. 39
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
  36. 24
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain.component.html
  37. 10
      ui-ngx/src/app/modules/home/pages/rulechain/rulenode.component.html

26
ui-ngx/src/app/modules/home/pages/asset/asset.component.html

@ -15,63 +15,63 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePublic')" (click)="onEntityAction($event, 'makePublic')"
[fxShow]="!isEdit && assetScope === 'tenant' && !isAssignedToCustomer(entity) && !entity?.customerIsPublic"> [class.!hidden]="isEdit || assetScope !== 'tenant' || isAssignedToCustomer(entity) || entity?.customerIsPublic">
{{'asset.make-public' | translate }} {{'asset.make-public' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'assignToCustomer')" (click)="onEntityAction($event, 'assignToCustomer')"
[fxShow]="!isEdit && assetScope === 'tenant' && !isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || assetScope !== 'tenant' || isAssignedToCustomer(entity)">
{{'asset.assign-to-customer' | translate }} {{'asset.assign-to-customer' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromCustomer')" (click)="onEntityAction($event, 'unassignFromCustomer')"
[fxShow]="!isEdit && (assetScope === 'customer' || assetScope === 'tenant') && isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || (assetScope !== 'customer' && assetScope !== 'tenant') || !isAssignedToCustomer(entity)">
{{ (entity?.customerIsPublic ? 'asset.make-private' : 'asset.unassign-from-customer') | translate }} {{ (entity?.customerIsPublic ? 'asset.make-private' : 'asset.unassign-from-customer') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromEdge')" (click)="onEntityAction($event, 'unassignFromEdge')"
[fxShow]="!isEdit && assetScope === 'edge'"> [class.!hidden]="isEdit || assetScope !== 'edge'">
{{ 'edge.unassign-from-edge' | translate }} {{ 'edge.unassign-from-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'asset.delete' | translate }} {{'asset.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onAssetIdCopied($event)" (cbOnSuccess)="onAssetIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>asset.copyId</span> <span translate>asset.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<mat-form-field class="mat-block" <mat-form-field class="mat-block"
[fxShow]="!isEdit && isAssignedToCustomer(entity) [class.!hidden]="isEdit || !isAssignedToCustomer(entity)
&& !entity?.customerIsPublic && assetScope === 'tenant'"> || entity?.customerIsPublic || assetScope !== 'tenant'">
<mat-label translate>asset.assignedToCustomer</mat-label> <mat-label translate>asset.assignedToCustomer</mat-label>
<input matInput disabled [ngModel]="entity?.customerTitle"> <input matInput disabled [ngModel]="entity?.customerTitle">
</mat-form-field> </mat-form-field>
<div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;"
[fxShow]="!isEdit && entity?.customerIsPublic && (assetScope === 'customer' || assetScope === 'tenant')"> [class.!hidden]="isEdit || !entity?.customerIsPublic || (assetScope !== 'customer' && assetScope !== 'tenant')">
{{ 'asset.asset-public' | translate }} {{ 'asset.asset-public' | translate }}
</div> </div>
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">

34
ui-ngx/src/app/modules/home/pages/customer/customer.component.html

@ -15,64 +15,64 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageUsers')" (click)="onEntityAction($event, 'manageUsers')"
[fxShow]="!isEdit && !isPublic"> [class.!hidden]="isEdit || isPublic">
{{'customer.manage-users' | translate }} {{'customer.manage-users' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageAssets')" (click)="onEntityAction($event, 'manageAssets')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'customer.manage-assets' | translate }} {{'customer.manage-assets' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageDevices')" (click)="onEntityAction($event, 'manageDevices')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'customer.manage-devices' | translate }} {{'customer.manage-devices' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageDashboards')" (click)="onEntityAction($event, 'manageDashboards')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'customer.manage-dashboards' | translate }} {{'customer.manage-dashboards' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageEdges')" (click)="onEntityAction($event, 'manageEdges')"
[fxShow]="!isEdit" [class.!hidden]="isEdit">
*ngIf="edgesSupportEnabled()"> *ngIf="edgesSupportEnabled()">
{{'customer.manage-edges' | translate }} {{'customer.manage-edges' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit && !isPublic"> [class.!hidden]="hideDelete() || isEdit || isPublic">
{{'customer.delete' | translate }} {{'customer.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onCustomerIdCopied($event)" (cbOnSuccess)="onCustomerIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>customer.copyId</span> <span translate>customer.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [fxShow]="!isPublic" [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [class.!hidden]="isPublic" [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>customer.title</mat-label> <mat-label translate>customer.title</mat-label>
<input matInput formControlName="title" required/> <input matInput formControlName="title" required/>
@ -83,22 +83,22 @@
{{ 'customer.title-max-length' | translate }} {{ 'customer.title-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div formGroupName="additionalInfo" fxLayout="column"> <div formGroupName="additionalInfo" class="flex flex-col">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>customer.description</mat-label> <mat-label translate>customer.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field> </mat-form-field>
<section class="tb-default-dashboard" fxFlex fxLayout="column" *ngIf="entity?.id"> <section class="tb-default-dashboard flex flex-1 flex-col" *ngIf="entity?.id">
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> <section class="flex flex-1 flex-col gt-sm:flex-row">
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex class="flex-1"
label="{{ 'dashboard.home-dashboard' | translate }}" label="{{ 'dashboard.home-dashboard' | translate }}"
formControlName="homeDashboardId" formControlName="homeDashboardId"
[dashboardsScope]="'customer'" [dashboardsScope]="'customer'"
[customerId]="entity?.id.id" [customerId]="entity?.id.id"
[selectFirstDashboard]="false" [selectFirstDashboard]="false"
></tb-dashboard-autocomplete> ></tb-dashboard-autocomplete>
<mat-checkbox fxFlex formControlName="homeDashboardHideToolbar"> <mat-checkbox class="flex-1" formControlName="homeDashboardHideToolbar">
{{ 'dashboard.home-dashboard-hide-toolbar' | translate }} {{ 'dashboard.home-dashboard-hide-toolbar' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>

38
ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.html

@ -15,75 +15,75 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'dashboard.open-dashboard' | translate }} {{'dashboard.open-dashboard' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'export')" (click)="onEntityAction($event, 'export')"
[fxShow]="!isEdit && dashboardScope === 'tenant'"> [class.!hidden]="isEdit || dashboardScope !== 'tenant'">
{{'dashboard.export' | translate }} {{'dashboard.export' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePublic')" (click)="onEntityAction($event, 'makePublic')"
[fxShow]="!isEdit && dashboardScope === 'tenant' && !isPublic(entity)"> [class.!hidden]="isEdit || dashboardScope !== 'tenant' || isPublic(entity)">
{{'dashboard.make-public' | translate }} {{'dashboard.make-public' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePrivate')" (click)="onEntityAction($event, 'makePrivate')"
[fxShow]="!isEdit && (dashboardScope === 'tenant' && isPublic(entity) [class.!hidden]="isEdit || !(dashboardScope === 'tenant' && isPublic(entity)
|| dashboardScope === 'customer' && isCurrentPublicCustomer(entity))"> || dashboardScope === 'customer' && isCurrentPublicCustomer(entity))">
{{'dashboard.make-private' | translate }} {{'dashboard.make-private' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageAssignedCustomers')" (click)="onEntityAction($event, 'manageAssignedCustomers')"
[fxShow]="!isEdit && dashboardScope === 'tenant'"> [class.!hidden]="isEdit || dashboardScope !== 'tenant'">
{{'dashboard.manage-assigned-customers' | translate }} {{'dashboard.manage-assigned-customers' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromCustomer')" (click)="onEntityAction($event, 'unassignFromCustomer')"
[fxShow]="!isEdit && dashboardScope === 'customer' && !isCurrentPublicCustomer(entity)"> [class.!hidden]="isEdit || dashboardScope !== 'customer' || isCurrentPublicCustomer(entity)">
{{ 'dashboard.unassign-from-customer' | translate }} {{ 'dashboard.unassign-from-customer' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromEdge')" (click)="onEntityAction($event, 'unassignFromEdge')"
[fxShow]="!isEdit && dashboardScope === 'edge'"> [class.!hidden]="isEdit || dashboardScope !== 'edge'">
{{ 'edge.unassign-from-edge' | translate }} {{ 'edge.unassign-from-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'dashboard.delete' | translate }} {{'dashboard.delete' | translate }}
</button> </button>
<div fxLayout="row"> <div class="flex flex-row">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onDashboardIdCopied($event)" (cbOnSuccess)="onDashboardIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>dashboard.copyId</span> <span translate>dashboard.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<mat-form-field class="mat-block" <mat-form-field class="mat-block"
[fxShow]="!isEdit && assignedCustomersText?.length [class.!hidden]="isEdit || !assignedCustomersText?.length
&& dashboardScope === 'tenant'"> || dashboardScope !== 'tenant'">
<mat-label translate>dashboard.assignedToCustomers</mat-label> <mat-label translate>dashboard.assignedToCustomers</mat-label>
<input matInput disabled [ngModel]="assignedCustomersText"> <input matInput disabled [ngModel]="assignedCustomersText">
</mat-form-field> </mat-form-field>
<div fxLayout="column" [fxShow]="!isEdit && (dashboardScope === 'tenant' && isPublic(entity) <div class="flex flex-col" [class.!hidden]="isEdit || !(dashboardScope === 'tenant' && isPublic(entity)
|| dashboardScope === 'customer' && isCurrentPublicCustomer(entity))"> || dashboardScope === 'customer' && isCurrentPublicCustomer(entity))">
<tb-social-share-panel style="padding-bottom: 1.25em;" <tb-social-share-panel style="padding-bottom: 1.25em;"
shareTitle="{{ 'dashboard.socialshare-title' | translate:{dashboardTitle: entity?.title} }}" shareTitle="{{ 'dashboard.socialshare-title' | translate:{dashboardTitle: entity?.title} }}"
@ -91,8 +91,8 @@
shareLink="{{ publicLink }}" shareLink="{{ publicLink }}"
shareHashTags="thingsboard, iot"> shareHashTags="thingsboard, iot">
</tb-social-share-panel> </tb-social-share-panel>
<div fxLayout="row"> <div class="flex flex-row">
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>dashboard.public-link</mat-label> <mat-label translate>dashboard.public-link</mat-label>
<input matInput disabled [ngModel]="publicLink"> <input matInput disabled [ngModel]="publicLink">
</mat-form-field> </mat-form-field>
@ -118,7 +118,7 @@
{{ 'dashboard.title-max-length' | translate }} {{ 'dashboard.title-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div formGroupName="configuration" fxLayout="column"> <div formGroupName="configuration" class="flex flex-col">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>dashboard.description</mat-label> <mat-label translate>dashboard.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>
@ -139,7 +139,7 @@
<mat-label translate>dashboard.mobile-order</mat-label> <mat-label translate>dashboard.mobile-order</mat-label>
<input matInput formControlName="mobileOrder" type="number" step="1"> <input matInput formControlName="mobileOrder" type="number" step="1">
</mat-form-field> </mat-form-field>
<tb-gallery-image-input fxFlex <tb-gallery-image-input class="flex-1"
label="{{'dashboard.image' | translate}}" label="{{'dashboard.image' | translate}}"
formControlName="image"> formControlName="image">
</tb-gallery-image-input> </tb-gallery-image-input>

12
ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.html

@ -16,9 +16,9 @@
--> -->
<div style="min-width: 400px; position: relative;"> <div style="min-width: 400px; position: relative;">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2>{{ 'dashboard.public-dashboard-title' | translate }}</h2> <h2>{{ 'dashboard.public-dashboard-title' | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="close()" (click)="close()"
type="button"> type="button">
@ -32,8 +32,8 @@
<span <span
innerHTML="{{ translate.get('dashboard.public-dashboard-text', {dashboardTitle: dashboard.title, publicLink: publicLink}) | async }}"> innerHTML="{{ translate.get('dashboard.public-dashboard-text', {dashboardTitle: dashboard.title, publicLink: publicLink}) | async }}">
</span> </span>
<div fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start">
<pre class="tb-highlight" fxFlex><code>{{ publicLink }}</code></pre> <pre class="tb-highlight flex-1"><code>{{ publicLink }}</code></pre>
<button mat-icon-button <button mat-icon-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onPublicLinkCopied($event)" (cbOnSuccess)="onPublicLinkCopied($event)"
@ -51,8 +51,8 @@
shareHashTags="thingsboard, iot"> shareHashTags="thingsboard, iot">
</tb-social-share-panel> </tb-social-share-panel>
</div> </div>
<div mat-dialog-actions fxLayout="row"> <div mat-dialog-actions class="flex flex-row">
<span fxFlex></span> <span class="flex-1"></span>
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

8
ui-ngx/src/app/modules/home/pages/dashboard/manage-dashboard-customers-dialog.component.html

@ -17,9 +17,9 @@
--> -->
<form style="width: 600px;" <form style="width: 600px;"
[formGroup]="dashboardCustomersFormGroup" (ngSubmit)="submit()"> [formGroup]="dashboardCustomersFormGroup" (ngSubmit)="submit()">
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2>{{ titleText | translate }}</h2> <h2>{{ titleText | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -39,8 +39,8 @@
</tb-entity-list> </tb-entity-list>
</fieldset> </fieldset>
</div> </div>
<div mat-dialog-actions fxLayout="row"> <div mat-dialog-actions class="flex flex-row">
<span fxFlex></span> <span class="flex-1"></span>
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

32
ui-ngx/src/app/modules/home/pages/device/data/snmp-device-transport-configuration.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<form [formGroup]="snmpDeviceTransportConfigurationFormGroup" style="padding-bottom: 16px;" fxLayoutGap="8px" fxLayout="column"> <form [formGroup]="snmpDeviceTransportConfigurationFormGroup" class="flex flex-col gap-2 pb-4">
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column"> <div class="flex flex-row gap-2 xs:flex-col">
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.host</mat-label> <mat-label translate>device-profile.snmp.host</mat-label>
<input matInput formControlName="host" required> <input matInput formControlName="host" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('host').hasError('required') || <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('host').hasError('required') ||
@ -25,7 +25,7 @@
{{ 'device-profile.snmp.host-required' | translate }} {{ 'device-profile.snmp.host-required' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.port</mat-label> <mat-label translate>device-profile.snmp.port</mat-label>
<input matInput formControlName="port" type="number" min="0" required> <input matInput formControlName="port" type="number" min="0" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('port').hasError('required')"> <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('port').hasError('required')">
@ -59,8 +59,8 @@
</mat-form-field> </mat-form-field>
</section> </section>
<section *ngIf="isV3protocolVersion()"> <section *ngIf="isV3protocolVersion()">
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column"> <div class="flex flex-row gap-2 xs:flex-col">
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.user-name</mat-label> <mat-label translate>device-profile.snmp.user-name</mat-label>
<input matInput formControlName="username" required> <input matInput formControlName="username" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('username').hasError('required') || <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('username').hasError('required') ||
@ -68,7 +68,7 @@
{{ 'device-profile.snmp.user-name-required' | translate }} {{ 'device-profile.snmp.user-name-required' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.security-name</mat-label> <mat-label translate>device-profile.snmp.security-name</mat-label>
<input matInput formControlName="securityName" required> <input matInput formControlName="securityName" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('securityName').hasError('required') || <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('securityName').hasError('required') ||
@ -77,8 +77,8 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column"> <div class="flex flex-row gap-2 xs:flex-col">
<mat-form-field fxFlex floatLabel="always" hideRequiredMarker> <mat-form-field class="flex-1" floatLabel="always" hideRequiredMarker>
<mat-label translate>device-profile.snmp.authentication-protocol</mat-label> <mat-label translate>device-profile.snmp.authentication-protocol</mat-label>
<mat-select formControlName="authenticationProtocol" required> <mat-select formControlName="authenticationProtocol" required>
<mat-option *ngFor="let snmpAuthenticationProtocol of snmpAuthenticationProtocols" [value]="snmpAuthenticationProtocol"> <mat-option *ngFor="let snmpAuthenticationProtocol of snmpAuthenticationProtocols" [value]="snmpAuthenticationProtocol">
@ -89,7 +89,7 @@
{{ 'device-profile.snmp.authentication-protocol-required' | translate }} {{ 'device-profile.snmp.authentication-protocol-required' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.authentication-passphrase</mat-label> <mat-label translate>device-profile.snmp.authentication-passphrase</mat-label>
<input matInput formControlName="authenticationPassphrase" required> <input matInput formControlName="authenticationPassphrase" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('authenticationPassphrase').hasError('required') || <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('authenticationPassphrase').hasError('required') ||
@ -98,8 +98,8 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column"> <div class="flex flex-row gap-2 xs:flex-col">
<mat-form-field fxFlex floatLabel="always" hideRequiredMarker> <mat-form-field class="flex-1" floatLabel="always" hideRequiredMarker>
<mat-label translate>device-profile.snmp.privacy-protocol</mat-label> <mat-label translate>device-profile.snmp.privacy-protocol</mat-label>
<mat-select formControlName="privacyProtocol" required> <mat-select formControlName="privacyProtocol" required>
<mat-option *ngFor="let snmpPrivacyProtocol of snmpPrivacyProtocols" [value]="snmpPrivacyProtocol"> <mat-option *ngFor="let snmpPrivacyProtocol of snmpPrivacyProtocols" [value]="snmpPrivacyProtocol">
@ -110,7 +110,7 @@
{{ 'device-profile.snmp.privacy-protocol-required' | translate }} {{ 'device-profile.snmp.privacy-protocol-required' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.privacy-passphrase</mat-label> <mat-label translate>device-profile.snmp.privacy-passphrase</mat-label>
<input matInput formControlName="privacyPassphrase" required> <input matInput formControlName="privacyPassphrase" required>
<mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('privacyPassphrase').hasError('required') || <mat-error *ngIf="snmpDeviceTransportConfigurationFormGroup.get('privacyPassphrase').hasError('required') ||
@ -119,12 +119,12 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" fxLayoutGap="8px" fxLayout.xs="column"> <div class="flex flex-row gap-2 xs:flex-col">
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.context-name</mat-label> <mat-label translate>device-profile.snmp.context-name</mat-label>
<input matInput formControlName="contextName"> <input matInput formControlName="contextName">
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex> <mat-form-field class="flex-1">
<mat-label translate>device-profile.snmp.engine-id</mat-label> <mat-label translate>device-profile.snmp.engine-id</mat-label>
<input matInput formControlName="engineId"> <input matInput formControlName="engineId">
</mat-form-field> </mat-form-field>

30
ui-ngx/src/app/modules/home/pages/device/device-check-connectivity-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{ dialogTitle }}</h2> <h2 translate>{{ dialogTitle }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<!-- <div [tb-help]="'check-connectivity'"></div>--> <!-- <div [tb-help]="'check-connectivity'"></div>-->
<button mat-icon-button <button mat-icon-button
(click)="close()" (click)="close()"
@ -32,7 +32,7 @@
name="TransportProtocol" name="TransportProtocol"
useSelectOnMdLg="false" useSelectOnMdLg="false"
appearance="fill" appearance="fill"
[fxHide]="allowTransportType.size < 2"> [class.!hidden]="allowTransportType.size < 2">
<tb-toggle-option <tb-toggle-option
*ngIf="allowTransportType.has(BasicTransportType.HTTP)" *ngIf="allowTransportType.has(BasicTransportType.HTTP)"
[value]="BasicTransportType.HTTP"> [value]="BasicTransportType.HTTP">
@ -59,7 +59,7 @@
{{ deviceTransportTypeTranslationMap.get(DeviceTransportType.LWM2M) | translate }} {{ deviceTransportTypeTranslationMap.get(DeviceTransportType.LWM2M) | translate }}
</tb-toggle-option> </tb-toggle-option>
</tb-toggle-header> </tb-toggle-header>
<div class="tb-form-panel no-padding no-border" [fxHide]="!allowTransportType.size"> <div class="tb-form-panel no-padding no-border" [class.!hidden]="!allowTransportType.size">
<ng-container [ngSwitch]="transportProtocol.value"> <ng-container [ngSwitch]="transportProtocol.value">
<ng-template [ngSwitchCase]="BasicTransportType.HTTP"> <ng-template [ngSwitchCase]="BasicTransportType.HTTP">
<div class="tb-no-data-text" translate>device.connectivity.use-following-instructions</div> <div class="tb-no-data-text" translate>device.connectivity.use-following-instructions</div>
@ -288,24 +288,24 @@
</ng-container> </ng-container>
</div> </div>
<div class="tb-form-panel stroked"> <div class="tb-form-panel stroked">
<div fxFlex fxLayout="row"> <div class="flex flex-1 flex-row">
<div class="tb-form-panel-title" translate>device.state</div> <div class="tb-form-panel-title" translate>device.state</div>
<div class="status" [ngClass]="{'inactive': !status, 'hide': status === undefined}"> <div class="status" [class.inactive]="!status" [class.hide]="status === undefined">
{{ (status ? 'device.active' : 'device.inactive') | translate }} {{ (status ? 'device.active' : 'device.inactive') | translate }}
</div> </div>
</div> </div>
<div class="tb-form-panel-hint tb-font-14" translate>attribute.latest-telemetry</div> <div class="tb-form-panel-hint tb-font-14" translate>attribute.latest-telemetry</div>
<div class="tb-form-table"> <div class="tb-form-table">
<div class="tb-form-table-header"> <div class="tb-form-table-header">
<div class="tb-form-table-header-cell" fxFlex translate>device.time</div> <div class="tb-form-table-header-cell flex-1" translate>device.time</div>
<div class="tb-form-table-header-cell" fxFlex translate>attribute.key</div> <div class="tb-form-table-header-cell flex-1" translate>attribute.key</div>
<div class="tb-form-table-header-cell" fxFlex translate>attribute.value</div> <div class="tb-form-table-header-cell flex-1" translate>attribute.value</div>
</div> </div>
<div *ngIf="latestTelemetry.length; else noData" class="tb-form-table-body"> <div *ngIf="latestTelemetry.length; else noData" class="tb-form-table-body">
<div class="tb-form-table-row" *ngFor="let telemetry of latestTelemetry"> <div class="tb-form-table-row" *ngFor="let telemetry of latestTelemetry">
<div class="tb-form-table-row-cell" fxFlex>{{ telemetry.lastUpdateTs | date: 'yyyy-MM-dd HH:mm:ss' }}</div> <div class="tb-form-table-row-cell flex-1">{{ telemetry.lastUpdateTs | date: 'yyyy-MM-dd HH:mm:ss' }}</div>
<div class="tb-form-table-row-cell" fxFlex>{{ telemetry.key }}</div> <div class="tb-form-table-row-cell flex-1">{{ telemetry.key }}</div>
<div class="tb-form-table-row-cell" fxFlex>{{ telemetry.value }}</div> <div class="tb-form-table-row-cell flex-1">{{ telemetry.value }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -313,8 +313,8 @@
</section> </section>
</div> </div>
<div mat-dialog-actions class="tb-dialog-actions"> <div mat-dialog-actions class="tb-dialog-actions">
<mat-slide-toggle fxShow="{{ showDontShowAgain }}" [(ngModel)]="notShowAgain">{{ 'action.dont-show-again' | translate}}</mat-slide-toggle> <mat-slide-toggle [class.!hidden]="!showDontShowAgain" [(ngModel)]="notShowAgain">{{ 'action.dont-show-again' | translate}}</mat-slide-toggle>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-button <button mat-button
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="close()">{{ 'action.close' | translate }}</button> (click)="close()">{{ 'action.close' | translate }}</button>
@ -336,10 +336,10 @@
<ng-template #executeCommand let-cmd="cmd"> <ng-template #executeCommand let-cmd="cmd">
<div class="tb-form-panel stroked"> <div class="tb-form-panel stroked">
<div fxLayout="row" fxLayoutAlign="space-between center" [fxHide]="!(cmd.noSec || cmd.sec !== 'Check documentation')"> <div class="flex flex-row items-center justify-between" [class.!hidden]="!(cmd.noSec || cmd.sec !== 'Check documentation')">
<div class="tb-form-panel-title" translate>device.connectivity.execute-following-command</div> <div class="tb-form-panel-title" translate>device.connectivity.execute-following-command</div>
<tb-toggle-header #protocolType value="{{ cmd.noSec ? 'noSec' : 'sec'}}" name="protocolType" useSelectOnMdLg="false" <tb-toggle-header #protocolType value="{{ cmd.noSec ? 'noSec' : 'sec'}}" name="protocolType" useSelectOnMdLg="false"
[fxShow]="cmd.noSec && cmd.sec"> [class.!hidden]="!cmd.noSec || !cmd.sec">
<tb-toggle-option value="noSec">{{ cmd.noSecLabel }}</tb-toggle-option> <tb-toggle-option value="noSec">{{ cmd.noSecLabel }}</tb-toggle-option>
<tb-toggle-option value="sec">{{ cmd.secLabel }}</tb-toggle-option> <tb-toggle-option value="sec">{{ cmd.secLabel }}</tb-toggle-option>
</tb-toggle-header> </tb-toggle-header>

4
ui-ngx/src/app/modules/home/pages/device/device-credentials-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ 'device.device-credentials' | translate }}</h2> <h2>{{ 'device.device-credentials' | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -36,7 +36,7 @@
</form> </form>
</section> </section>
<ng-template #loadCredentials> <ng-template #loadCredentials>
<div fxLayout="column" fxLayoutAlign="center center"> <div class="flex flex-col items-center justify-center">
<mat-spinner color="accent" diameter="65" strokeWidth="4" style="margin-bottom: 18px"></mat-spinner> <mat-spinner color="accent" diameter="65" strokeWidth="4" style="margin-bottom: 18px"></mat-spinner>
<span class="mat-subtitle-1" style="margin-bottom: 0"> <span class="mat-subtitle-1" style="margin-bottom: 0">
{{ 'device.loading-device-credentials' | translate }} {{ 'device.loading-device-credentials' | translate }}

36
ui-ngx/src/app/modules/home/pages/device/device.component.html

@ -15,82 +15,82 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePublic')" (click)="onEntityAction($event, 'makePublic')"
[fxShow]="!isEdit && deviceScope === 'tenant' && !isAssignedToCustomer(entity) && !entity?.customerIsPublic"> [class.!hidden]="isEdit || deviceScope !== 'tenant' || isAssignedToCustomer(entity) || entity?.customerIsPublic">
{{'device.make-public' | translate }} {{'device.make-public' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'assignToCustomer')" (click)="onEntityAction($event, 'assignToCustomer')"
[fxShow]="!isEdit && deviceScope === 'tenant' && !isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || deviceScope !== 'tenant' || isAssignedToCustomer(entity)">
{{'device.assign-to-customer' | translate }} {{'device.assign-to-customer' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromCustomer')" (click)="onEntityAction($event, 'unassignFromCustomer')"
[fxShow]="!isEdit && (deviceScope === 'customer' || deviceScope === 'tenant') && isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || (deviceScope !== 'customer' && deviceScope !== 'tenant') || !isAssignedToCustomer(entity)">
{{ (entity?.customerIsPublic ? 'device.make-private' : 'device.unassign-from-customer') | translate }} {{ (entity?.customerIsPublic ? 'device.make-private' : 'device.unassign-from-customer') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageCredentials')" (click)="onEntityAction($event, 'manageCredentials')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ ((deviceScope === 'customer_user' || deviceScope === 'edge_customer_user') ? 'device.view-credentials' : 'device.manage-credentials') | translate }} {{ ((deviceScope === 'customer_user' || deviceScope === 'edge_customer_user') ? 'device.view-credentials' : 'device.manage-credentials') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'checkConnectivity')" (click)="onEntityAction($event, 'checkConnectivity')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ 'device.connectivity.check-connectivity' | translate }} {{ 'device.connectivity.check-connectivity' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromEdge')" (click)="onEntityAction($event, 'unassignFromEdge')"
[fxShow]="!isEdit && deviceScope === 'edge'"> [class.!hidden]="isEdit || deviceScope !== 'edge'">
{{ 'edge.unassign-from-edge' | translate }} {{ 'edge.unassign-from-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" fxFlex.xs <button mat-raised-button color="primary" class="xs:flex-1"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'device.delete' | translate }} {{'device.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onDeviceIdCopied($event)" (cbOnSuccess)="onDeviceIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>device.copyId</span> <span translate>device.copyId</span>
</button> </button>
<tb-copy-device-credentials <tb-copy-device-credentials
[fxShow]="!isEdit" [class.!hidden]="isEdit"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[credentials$]="deviceCredentials$" [credentials$]="deviceCredentials$"
[deviceId]="entity?.id"> [deviceId]="entity?.id">
</tb-copy-device-credentials> </tb-copy-device-credentials>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<mat-form-field class="mat-block" <mat-form-field class="mat-block"
[fxShow]="!isEdit && isAssignedToCustomer(entity) [class.!hidden]="isEdit || !isAssignedToCustomer(entity)
&& !entity?.customerIsPublic && deviceScope === 'tenant'"> || entity?.customerIsPublic || deviceScope !== 'tenant'">
<mat-label translate>device.assignedToCustomer</mat-label> <mat-label translate>device.assignedToCustomer</mat-label>
<input matInput disabled [ngModel]="entity?.customerTitle"> <input matInput disabled [ngModel]="entity?.customerTitle">
</mat-form-field> </mat-form-field>
<div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;"
[fxShow]="!isEdit && entity?.customerIsPublic && (deviceScope === 'customer' || deviceScope === 'tenant')"> [class.!hidden]="isEdit || !entity?.customerIsPublic || (deviceScope !== 'customer' && deviceScope !== 'tenant')">
{{ 'device.device-public' | translate }} {{ 'device.device-public' | translate }}
</div> </div>
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
@ -138,7 +138,7 @@
formControlName="deviceData" formControlName="deviceData"
required> required>
</tb-device-data> </tb-device-data>
<div formGroupName="additionalInfo" fxLayout="column"> <div formGroupName="additionalInfo" class="flex flex-col">
<div class="toggle-group"> <div class="toggle-group">
<mat-slide-toggle formControlName="gateway" style="min-width: 165px"> <mat-slide-toggle formControlName="gateway" style="min-width: 165px">
{{ 'device.is-gateway' | translate }} {{ 'device.is-gateway' | translate }}

6
ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{ dialogTitle }}</h2> <h2 translate>{{ dialogTitle }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="close()" (click)="close()"
type="button"> type="button">
@ -72,8 +72,8 @@
</section> </section>
</div> </div>
<div mat-dialog-actions class="tb-dialog-actions"> <div mat-dialog-actions class="tb-dialog-actions">
<mat-slide-toggle fxShow="{{ showDontShowAgain }}" [(ngModel)]="notShowAgain">{{ 'action.dont-show-again' | translate}}</mat-slide-toggle> <mat-slide-toggle [class.!hidden]="!showDontShowAgain" [(ngModel)]="notShowAgain">{{ 'action.dont-show-again' | translate}}</mat-slide-toggle>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-button <button mat-button
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="close()">{{ 'action.close' | translate }}</button> (click)="close()">{{ 'action.close' | translate }}</button>

58
ui-ngx/src/app/modules/home/pages/edge/edge.component.html

@ -15,74 +15,74 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePublic')" (click)="onEntityAction($event, 'makePublic')"
[fxShow]="!isEdit && edgeScope === 'tenant' && !isAssignedToCustomer(entity) && !entity?.customerIsPublic"> [class.!hidden]="isEdit || edgeScope !== 'tenant' || isAssignedToCustomer(entity) || entity?.customerIsPublic">
{{'edge.make-public' | translate }} {{'edge.make-public' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'assignToCustomer')" (click)="onEntityAction($event, 'assignToCustomer')"
[fxShow]="!isEdit && edgeScope === 'tenant' && !isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || edgeScope !== 'tenant' || isAssignedToCustomer(entity)">
{{'edge.assign-to-customer' | translate }} {{'edge.assign-to-customer' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromCustomer')" (click)="onEntityAction($event, 'unassignFromCustomer')"
[fxShow]="!isEdit && (edgeScope === 'customer' || edgeScope === 'tenant') && isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || (edgeScope !== 'customer' && edgeScope !== 'tenant') || !isAssignedToCustomer(entity)">
{{ (entity?.customerIsPublic ? 'edge.make-private' : 'edge.unassign-from-customer') | translate }} {{ (entity?.customerIsPublic ? 'edge.make-private' : 'edge.unassign-from-customer') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeAssets')" (click)="onEntityAction($event, 'openEdgeAssets')"
[fxShow]="!isEdit && edgeScope !== 'customer'"> [class.!hidden]="isEdit || edgeScope === 'customer'">
{{'edge.manage-assets' | translate }} {{'edge.manage-assets' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDevices')" (click)="onEntityAction($event, 'openEdgeDevices')"
[fxShow]="!isEdit && edgeScope !== 'customer'"> [class.!hidden]="isEdit || edgeScope === 'customer'">
{{'edge.manage-devices' | translate }} {{'edge.manage-devices' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeEntityViews')" (click)="onEntityAction($event, 'openEdgeEntityViews')"
[fxShow]="!isEdit && edgeScope !== 'customer'"> [class.!hidden]="isEdit || edgeScope === 'customer'">
{{'edge.manage-entity-views' | translate }} {{'edge.manage-entity-views' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeDashboards')" (click)="onEntityAction($event, 'openEdgeDashboards')"
[fxShow]="!isEdit && edgeScope !== 'customer'"> [class.!hidden]="isEdit || edgeScope === 'customer'">
{{'edge.manage-dashboards' | translate }} {{'edge.manage-dashboards' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openEdgeRuleChains')" (click)="onEntityAction($event, 'openEdgeRuleChains')"
[fxShow]="!isEdit && edgeScope === 'tenant'"> [class.!hidden]="isEdit || edgeScope !== 'tenant'">
{{'edge.manage-rulechains' | translate }} {{'edge.manage-rulechains' | translate }}
</button> </button>
<button mat-raised-button color="primary" fxFlex.xs <button mat-raised-button color="primary" class="xs:flex-1"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'edge.delete' | translate }} {{'edge.delete' | translate }}
</button> </button>
<div fxLayout="row wrap" fxLayout.xs="column"> <div class="flex flex-row flex-wrap xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onEdgeIdCopied($event)" (cbOnSuccess)="onEdgeIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-id</span> <span translate>edge.copy-id</span>
</button> </button>
@ -91,7 +91,7 @@
(cbOnSuccess)="onEdgeInfoCopied('key')" (cbOnSuccess)="onEdgeInfoCopied('key')"
[cbContent]="entity?.routingKey" [cbContent]="entity?.routingKey"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[fxShow]="!isEdit && edgeScope !== 'customer_user'"> [class.!hidden]="isEdit || edgeScope === 'customer_user'">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-key</span> <span translate>edge.copy-edge-key</span>
</button> </button>
@ -100,7 +100,7 @@
(cbOnSuccess)="onEdgeInfoCopied('secret')" (cbOnSuccess)="onEdgeInfoCopied('secret')"
[cbContent]="entity?.secret" [cbContent]="entity?.secret"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[fxShow]="!isEdit && edgeScope !== 'customer_user'"> [class.!hidden]="isEdit || edgeScope === 'customer_user'">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-secret</span> <span translate>edge.copy-edge-secret</span>
</button> </button>
@ -108,18 +108,18 @@
ngxClipboard ngxClipboard
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'syncEdge')" (click)="onEntityAction($event, 'syncEdge')"
[fxShow]="!isEdit && edgeScope !== 'customer_user'"> [class.!hidden]="isEdit || edgeScope === 'customer_user'">
<mat-icon svgIcon="mdi:sync"></mat-icon> <mat-icon svgIcon="mdi:sync"></mat-icon>
<span translate>edge.sync</span> <span translate>edge.sync</span>
</button> </button>
</div> </div>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<div [ngSwitch]="upgradeAvailable"> <div [ngSwitch]="upgradeAvailable">
<ng-container *ngSwitchCase="false"> <ng-container *ngSwitchCase="false">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openInstallInstructions')" (click)="onEntityAction($event, 'openInstallInstructions')"
[fxShow]="!isEdit && edgeScope !== 'customer_user'"> [class.!hidden]="isEdit || edgeScope === 'customer_user'">
<mat-icon>info_outline</mat-icon> <mat-icon>info_outline</mat-icon>
<span>{{ 'edge.install-connect-instructions' | translate }}</span> <span>{{ 'edge.install-connect-instructions' | translate }}</span>
</button> </button>
@ -128,7 +128,7 @@
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openUpgradeInstructions')" (click)="onEntityAction($event, 'openUpgradeInstructions')"
[fxShow]="!isEdit && edgeScope !== 'customer_user'"> [class.!hidden]="isEdit || edgeScope === 'customer_user'">
<mat-icon>info_outline</mat-icon> <mat-icon>info_outline</mat-icon>
<span>{{ 'edge.upgrade-instructions' | translate }}</span> <span>{{ 'edge.upgrade-instructions' | translate }}</span>
</button> </button>
@ -136,15 +136,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<mat-form-field class="mat-block" <mat-form-field class="mat-block"
[fxShow]="!isEdit && isAssignedToCustomer(entity) [class.!hidden]="isEdit || !isAssignedToCustomer(entity)
&& !entity?.customerIsPublic && edgeScope === 'tenant'"> || entity?.customerIsPublic || edgeScope !== 'tenant'">
<mat-label translate>edge.assignedToCustomer</mat-label> <mat-label translate>edge.assignedToCustomer</mat-label>
<input matInput disabled [ngModel]="entity?.customerTitle"> <input matInput disabled [ngModel]="entity?.customerTitle">
</mat-form-field> </mat-form-field>
<div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;"
[fxShow]="!isEdit && entity?.customerIsPublic && edgeScope === 'tenant'"> [class.!hidden]="isEdit || !entity?.customerIsPublic || edgeScope !== 'tenant'">
{{ 'edge.edge-public' | translate }} {{ 'edge.edge-public' | translate }}
</div> </div>
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
@ -165,8 +165,8 @@
[entityType]="entityType.EDGE"> [entityType]="entityType.EDGE">
</tb-entity-subtype-autocomplete> </tb-entity-subtype-autocomplete>
</fieldset> </fieldset>
<div fxLayout="row" [fxShow]="edgeScope !== 'customer_user'"> <div class="flex flex-row" [class.!hidden]="edgeScope === 'customer_user'">
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>edge.edge-key</mat-label> <mat-label translate>edge.edge-key</mat-label>
<input matInput formControlName="routingKey"> <input matInput formControlName="routingKey">
</mat-form-field> </mat-form-field>
@ -176,8 +176,8 @@
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
</button> </button>
</div> </div>
<div fxLayout="row" [fxShow]="edgeScope !== 'customer_user'"> <div class="flex flex-row" [class.!hidden]="edgeScope === 'customer_user'">
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>edge.edge-secret</mat-label> <mat-label translate>edge.edge-secret</mat-label>
<input matInput formControlName="secret"> <input matInput formControlName="secret">
</mat-form-field> </mat-form-field>
@ -195,7 +195,7 @@
{{ 'edge.label-max-length' | translate }} {{ 'edge.label-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div formGroupName="additionalInfo" fxLayout="column"> <div formGroupName="additionalInfo" class="flex flex-col">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>edge.description</mat-label> <mat-label translate>edge.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>

30
ui-ngx/src/app/modules/home/pages/entity-view/entity-view.component.html

@ -15,63 +15,63 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'makePublic')" (click)="onEntityAction($event, 'makePublic')"
[fxShow]="!isEdit && entityViewScope === 'tenant' && !isAssignedToCustomer(entity) && !entity?.customerIsPublic"> [class.!hidden]="isEdit || entityViewScope !== 'tenant' || isAssignedToCustomer(entity) || entity?.customerIsPublic">
{{'entity-view.make-public' | translate }} {{'entity-view.make-public' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'assignToCustomer')" (click)="onEntityAction($event, 'assignToCustomer')"
[fxShow]="!isEdit && entityViewScope === 'tenant' && !isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || entityViewScope !== 'tenant' || isAssignedToCustomer(entity)">
{{'entity-view.assign-to-customer' | translate }} {{'entity-view.assign-to-customer' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromCustomer')" (click)="onEntityAction($event, 'unassignFromCustomer')"
[fxShow]="!isEdit && (entityViewScope === 'customer' || entityViewScope === 'tenant') && isAssignedToCustomer(entity)"> [class.!hidden]="isEdit || (entityViewScope !== 'customer' && entityViewScope !== 'tenant') || !isAssignedToCustomer(entity)">
{{ (entity?.customerIsPublic ? 'entity-view.make-private' : 'entity-view.unassign-from-customer') | translate }} {{ (entity?.customerIsPublic ? 'entity-view.make-private' : 'entity-view.unassign-from-customer') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromEdge')" (click)="onEntityAction($event, 'unassignFromEdge')"
[fxShow]="!isEdit && entityViewScope === 'edge'"> [class.!hidden]="isEdit || entityViewScope !== 'edge'">
{{ 'edge.unassign-from-edge' | translate }} {{ 'edge.unassign-from-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'entity-view.delete' | translate }} {{'entity-view.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onEntityViewIdCopied($event)" (cbOnSuccess)="onEntityViewIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>entity-view.copyId</span> <span translate>entity-view.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<mat-form-field class="mat-block" <mat-form-field class="mat-block"
[fxShow]="!isEdit && isAssignedToCustomer(entity) [class.!hidden]="isEdit || !isAssignedToCustomer(entity)
&& !entity?.customerIsPublic && entityViewScope === 'tenant'"> || entity?.customerIsPublic || entityViewScope !== 'tenant'">
<mat-label translate>entity-view.assignedToCustomer</mat-label> <mat-label translate>entity-view.assignedToCustomer</mat-label>
<input matInput disabled [ngModel]="entity?.customerTitle"> <input matInput disabled [ngModel]="entity?.customerTitle">
</mat-form-field> </mat-form-field>
<div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;" <div class="tb-small" style="padding-bottom: 10px; padding-left: 2px;"
[fxShow]="!isEdit && entity?.customerIsPublic && (entityViewScope === 'customer' || entityViewScope === 'tenant')"> [class.!hidden]="isEdit || !entity?.customerIsPublic || (entityViewScope !== 'customer' && entityViewScope !== 'tenant')">
{{ 'entity-view.entity-view-public' | translate }} {{ 'entity-view.entity-view-public' | translate }}
</div> </div>
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
@ -92,9 +92,9 @@
[entityType]="entityType.ENTITY_VIEW" [entityType]="entityType.ENTITY_VIEW"
> >
</tb-entity-subtype-autocomplete> </tb-entity-subtype-autocomplete>
<section fxLayout="column"> <section class="flex flex-col">
<label translate class="tb-title no-padding">entity-view.target-entity</label> <label translate class="tb-title no-padding">entity-view.target-entity</label>
<tb-entity-select fxFlex <tb-entity-select class="flex-1"
[required]="true" [required]="true"
[allowedEntityTypes]="allowedEntityTypes" [allowedEntityTypes]="allowedEntityTypes"
formControlName="entityId"> formControlName="entityId">

6
ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html

@ -15,13 +15,13 @@
limitations under the License. limitations under the License.
--> -->
<div fxFlex="100" fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-full flex-row items-center justify-start">
<mat-button-toggle-group class="tb-notification-unread-toggle-group" <mat-button-toggle-group class="tb-notification-unread-toggle-group"
style="width: 180px;" style="width: 180px;"
[ngModel]="entitiesTableConfig.componentsData.unreadOnly" [ngModel]="entitiesTableConfig.componentsData.unreadOnly"
(ngModelChange)="changeUnreadOnly($event)"> (ngModelChange)="changeUnreadOnly($event)">
<mat-button-toggle fxFlex [value]=true>{{ 'notification.unread' | translate }}</mat-button-toggle> <mat-button-toggle class="flex-1" [value]=true>{{ 'notification.unread' | translate }}</mat-button-toggle>
<mat-button-toggle fxFlex [value]=false>{{ 'notification.all' | translate }}</mat-button-toggle> <mat-button-toggle class="flex-1" [value]=false>{{ 'notification.all' | translate }}</mat-button-toggle>
</mat-button-toggle-group> </mat-button-toggle-group>
</div> </div>

10
ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.component.html

@ -18,7 +18,7 @@
<form [formGroup]="targetNotificationForm" class="tb-dialog-container"> <form [formGroup]="targetNotificationForm" class="tb-dialog-container">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ (isAdd ? 'notification.add-notification-recipients-group' : 'notification.edit-notification-recipients-group') | translate }}</h2> <h2>{{ (isAdd ? 'notification.add-notification-recipients-group' : 'notification.edit-notification-recipients-group') | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div tb-help="recipientNotifications"></div> <div tb-help="recipientNotifications"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -28,7 +28,7 @@
</mat-toolbar> </mat-toolbar>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="(isLoading$ | async) === false"></div>
<div mat-dialog-content> <div mat-dialog-content>
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>notification.name</mat-label> <mat-label translate>notification.name</mat-label>
@ -41,7 +41,7 @@
<label class="tb-title">{{ 'notification.type' | translate }}</label> <label class="tb-title">{{ 'notification.type' | translate }}</label>
<mat-radio-group formControlName="type"> <mat-radio-group formControlName="type">
<mat-radio-button *ngFor="let notificationTargetType of notificationTargetTypes" [value]="notificationTargetType"> <mat-radio-button *ngFor="let notificationTargetType of notificationTargetTypes" [value]="notificationTargetType">
<div fxLayout="column"> <div class="flex flex-col">
<div>{{ notificationTargetTypeTranslationMap.get(notificationTargetType) | translate }}</div> <div>{{ notificationTargetTypeTranslationMap.get(notificationTargetType) | translate }}</div>
</div> </div>
</mat-radio-button> </mat-radio-button>
@ -60,7 +60,7 @@
<ng-container [ngSwitch]="targetNotificationForm.get('configuration.usersFilter.type').value"> <ng-container [ngSwitch]="targetNotificationForm.get('configuration.usersFilter.type').value">
<ng-container *ngSwitchCase="notificationTargetConfigType.TENANT_ADMINISTRATORS"> <ng-container *ngSwitchCase="notificationTargetConfigType.TENANT_ADMINISTRATORS">
<section *ngIf="isSysAdmin()"> <section *ngIf="isSysAdmin()">
<div fxFlex fxLayoutAlign="center center"> <div class="flex flex-1 items-center justify-center">
<tb-toggle-select class="tb-notification-tenant-group" appearance="fill" <tb-toggle-select class="tb-notification-tenant-group" appearance="fill"
formControlName="filterByTenants"> formControlName="filterByTenants">
<tb-toggle-option [value]="true">{{ 'tenant.tenant' | translate }}</tb-toggle-option> <tb-toggle-option [value]="true">{{ 'tenant.tenant' | translate }}</tb-toggle-option>
@ -157,7 +157,7 @@
</section> </section>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div mat-dialog-actions fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="end"> <div mat-dialog-actions class="flex flex-row items-stretch justify-end gap-2">
<button mat-button <button mat-button
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="cancel()">{{ 'action.cancel' | translate }}</button> (click)="cancel()">{{ 'action.cancel' | translate }}</button>

4
ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<div fxFlex="100" fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-full flex-row items-center justify-end">
<button mat-stroked-button color="primary" (click)="createTarget($event)"> <button mat-stroked-button color="primary" (click)="createTarget($event)">
<div fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start">
<mat-icon>add</mat-icon>{{ 'notification.add-recipients' | translate }} <mat-icon>add</mat-icon>{{ 'notification.add-recipients' | translate }}
</div> </div>
</button> </button>

14
ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.html

@ -15,11 +15,11 @@
limitations under the License. limitations under the License.
--> -->
<form [formGroup]="escalationFormGroup" fxLayout="column"> <form [formGroup]="escalationFormGroup" class="flex flex-col">
<div class="escalation" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center center" fxLayoutAlign.xs="start"> <div class="escalation flex flex-row items-center justify-center xs:flex-col xs:items-stretch xs:justify-start">
<div fxFlex *ngIf="systemEscalation; else selectTime" translate>notification.first-recipient</div> <div class="flex-1" *ngIf="systemEscalation; else selectTime" translate>notification.first-recipient</div>
<ng-template #selectTime> <ng-template #selectTime>
<div fxFlex fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center center"> <div class="flex flex-1 flex-row items-center justify-center xs:flex-col">
<span translate>notification.after</span> <span translate>notification.after</span>
<tb-timeinterval <tb-timeinterval
subscriptSizing="dynamic" subscriptSizing="dynamic"
@ -27,19 +27,19 @@
min="60000" min="60000"
max="604800000" max="604800000"
disabledAdvanced></tb-timeinterval> disabledAdvanced></tb-timeinterval>
<span fxFlex class="escalation-notify" translate>notification.notify</span> <span class="escalation-notify flex-1" translate>notification.notify</span>
</div> </div>
</ng-template> </ng-template>
<tb-entity-list <tb-entity-list
required required
fxFlex="60" class="max-w-60% flex-full"
formControlName="targets" formControlName="targets"
subscriptSizing="dynamic" subscriptSizing="dynamic"
entityType="{{ entityType.NOTIFICATION_TARGET }}" entityType="{{ entityType.NOTIFICATION_TARGET }}"
subType="{{ notificationType.ALARM }}" subType="{{ notificationType.ALARM }}"
[placeholderText]="escalationFormGroup.get('targets').value ? '' : ('notification.add-recipient' | translate)"> [placeholderText]="escalationFormGroup.get('targets').value ? '' : ('notification.add-recipient' | translate)">
<button #createTargetButton <button #createTargetButton
mat-button [fxHide]="disabled" matSuffix mat-button [class.!hidden]="disabled" matSuffix
(click)="createTarget($event, createTargetButton)"> (click)="createTarget($event, createTargetButton)">
<span style="white-space: nowrap">{{ 'notification.create-new' | translate }}</span> <span style="white-space: nowrap">{{ 'notification.create-new' | translate }}</span>
</button> </button>

13
ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.html

@ -15,13 +15,12 @@
limitations under the License. limitations under the License.
--> -->
<div fxLayout="column"> <div class="flex flex-col">
<div class="tb-tenant-profile-queues" <div class="tb-tenant-profile-queues flex flex-row items-center"
fxLayout="row" style="align-items: center"
*ngFor="let escalationControl of escalationsFormArray.controls; *ngFor="let escalationControl of escalationsFormArray.controls;
let $index = index; last as isLast;" let $index = index; last as isLast;"
[ngStyle]="!isLast ? {paddingBottom: '8px'} : {}"> [class.pb-2]="!isLast">
<tb-escalation-form fxFlex <tb-escalation-form class="flex-1"
[formControl]="escalationControl" [formControl]="escalationControl"
[systemEscalation]="$index === 0"> [systemEscalation]="$index === 0">
</tb-escalation-form> </tb-escalation-form>
@ -35,8 +34,8 @@
</button> </button>
</div> </div>
<div *ngIf="!escalationsFormArray.controls.length"> <div *ngIf="!escalationsFormArray.controls.length">
<span translate fxLayoutAlign="center center" <span translate
class="tb-prompt">notification.no-rule</span> class="tb-prompt flex items-center justify-center">notification.no-rule</span>
</div> </div>
<div *ngIf="!disabled" style="padding: 16px 0;"> <div *ngIf="!disabled" style="padding: 16px 0;">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"

57
ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ dialogTitle | translate }}</h2> <h2>{{ dialogTitle | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div tb-help="ruleNotifications"></div> <div tb-help="ruleNotifications"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -27,8 +27,8 @@
</mat-toolbar> </mat-toolbar>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="(isLoading$ | async) === false"></div>
<div mat-dialog-content ngStyle.xs="padding: 0;"> <div mat-dialog-content class="xs:p-0">
<mat-horizontal-stepper [linear]="true" labelPosition="end" #addNotificationRule [orientation]="(stepperOrientation | async)" <mat-horizontal-stepper [linear]="true" labelPosition="end" #addNotificationRule [orientation]="(stepperOrientation | async)"
(selectionChange)="changeStep($event)"> (selectionChange)="changeStep($event)">
<ng-template matStepperIcon="edit"> <ng-template matStepperIcon="edit">
@ -94,7 +94,7 @@
<section formGroupName="triggerConfig"> <section formGroupName="triggerConfig">
<section formGroupName="clearRule"> <section formGroupName="clearRule">
<div class="mat-body-2" translate>notification.stop-escalation-alarm-status-become</div> <div class="mat-body-2" translate>notification.stop-escalation-alarm-status-become</div>
<mat-form-field fxFlex class="mat-block" floatLabel="always" style="margin-right: 48px"> <mat-form-field class="mat-block flex-1" floatLabel="always" style="margin-right: 48px">
<mat-label translate>alarm.alarm-status-list</mat-label> <mat-label translate>alarm.alarm-status-list</mat-label>
<mat-select formControlName="alarmStatuses" multiple <mat-select formControlName="alarmStatuses" multiple
placeholder="{{ !alarmTemplateForm.get('triggerConfig.clearRule.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}"> placeholder="{{ !alarmTemplateForm.get('triggerConfig.clearRule.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}">
@ -123,7 +123,7 @@
formControlName="alarmTypes"> formControlName="alarmTypes">
</tb-string-items-list> </tb-string-items-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>alarm.alarm-severity-list</mat-label> <mat-label translate>alarm.alarm-severity-list</mat-label>
<mat-select formControlName="alarmSeverities" multiple <mat-select formControlName="alarmSeverities" multiple
placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}"> placeholder="{{ !alarmTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}">
@ -133,7 +133,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</fieldset> </fieldset>
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>notification.notify-on</mat-label> <mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple> <mat-select formControlName="notifyOn" multiple>
<mat-option *ngFor="let alarmAction of alarmActions" [value]="alarmAction"> <mat-option *ngFor="let alarmAction of alarmActions" [value]="alarmAction">
@ -161,12 +161,12 @@
<ng-template matStepLabel>{{ 'notification.device-activity-trigger-settings' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.device-activity-trigger-settings' | translate }}</ng-template>
<form [formGroup]="deviceInactivityTemplateForm"> <form [formGroup]="deviceInactivityTemplateForm">
<section formGroupName="triggerConfig"> <section formGroupName="triggerConfig">
<div fxFlex fxLayoutAlign="center center"> <div class="flex flex-1 items-center justify-center">
<mat-button-toggle-group class="tb-notification-unread-toggle-group" <mat-button-toggle-group class="tb-notification-unread-toggle-group"
style="width: 250px;" style="width: 250px;"
formControlName="filterByDevice"> formControlName="filterByDevice">
<mat-button-toggle fxFlex [value]=true>{{ 'device.device' | translate }}</mat-button-toggle> <mat-button-toggle class="flex-1" [value]=true>{{ 'device.device' | translate }}</mat-button-toggle>
<mat-button-toggle fxFlex [value]=false>{{ 'device-profile.device-profile' | translate }}</mat-button-toggle> <mat-button-toggle class="flex-1" [value]=false>{{ 'device-profile.device-profile' | translate }}</mat-button-toggle>
</mat-button-toggle-group> </mat-button-toggle-group>
</div> </div>
<ng-container *ngIf="deviceInactivityTemplateForm.get('triggerConfig.filterByDevice').value; else deviceProfile"> <ng-container *ngIf="deviceInactivityTemplateForm.get('triggerConfig.filterByDevice').value; else deviceProfile">
@ -189,7 +189,7 @@
[entityType]="entityType.DEVICE_PROFILE"> [entityType]="entityType.DEVICE_PROFILE">
</tb-entity-list> </tb-entity-list>
</ng-template> </ng-template>
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>notification.notify-on</mat-label> <mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple> <mat-select formControlName="notifyOn" multiple>
<mat-option *ngFor="let deviceEvent of deviceEvents" [value]="deviceEvent"> <mat-option *ngFor="let deviceEvent of deviceEvents" [value]="deviceEvent">
@ -223,8 +223,8 @@
[allowedEntityTypes]="allowEntityTypeForEntityAction" [allowedEntityTypes]="allowEntityTypeForEntityAction"
formControlName="entityTypes"> formControlName="entityTypes">
</tb-entity-type-list> </tb-entity-type-list>
<section fxLayout="column" fxLayoutGap="8px"> <section class="flex flex-col gap-2">
<span fxFlex translate>notification.status</span> <span class="flex-1" translate>notification.status</span>
<mat-slide-toggle formControlName="created">{{ 'notification.created' | translate }}</mat-slide-toggle> <mat-slide-toggle formControlName="created">{{ 'notification.created' | translate }}</mat-slide-toggle>
<mat-slide-toggle formControlName="updated">{{ 'notification.updated' | translate }}</mat-slide-toggle> <mat-slide-toggle formControlName="updated">{{ 'notification.updated' | translate }}</mat-slide-toggle>
<mat-slide-toggle formControlName="deleted">{{ 'notification.deleted' | translate }}</mat-slide-toggle> <mat-slide-toggle formControlName="deleted">{{ 'notification.deleted' | translate }}</mat-slide-toggle>
@ -256,7 +256,7 @@
formControlName="alarmTypes"> formControlName="alarmTypes">
</tb-string-items-list> </tb-string-items-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>alarm.alarm-severity-list</mat-label> <mat-label translate>alarm.alarm-severity-list</mat-label>
<mat-select formControlName="alarmSeverities" multiple <mat-select formControlName="alarmSeverities" multiple
placeholder="{{ !alarmCommentTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}"> placeholder="{{ !alarmCommentTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}">
@ -265,7 +265,7 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>alarm.alarm-status-list</mat-label> <mat-label translate>alarm.alarm-status-list</mat-label>
<mat-select formControlName="alarmStatuses" multiple <mat-select formControlName="alarmStatuses" multiple
placeholder="{{ !alarmCommentTemplateForm.get('triggerConfig.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}"> placeholder="{{ !alarmCommentTemplateForm.get('triggerConfig.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}">
@ -275,7 +275,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</fieldset> </fieldset>
<section fxLayout="column"> <section class="flex flex-col">
<mat-slide-toggle formControlName="onlyUserComments" style="margin-bottom: 12px;"> <mat-slide-toggle formControlName="onlyUserComments" style="margin-bottom: 12px;">
{{ 'notification.notify-only-user-comments' | translate }} {{ 'notification.notify-only-user-comments' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
@ -309,7 +309,7 @@
formControlName="alarmTypes"> formControlName="alarmTypes">
</tb-string-items-list> </tb-string-items-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>alarm.alarm-severity-list</mat-label> <mat-label translate>alarm.alarm-severity-list</mat-label>
<mat-select formControlName="alarmSeverities" multiple <mat-select formControlName="alarmSeverities" multiple
placeholder="{{ !alarmAssignmentTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}"> placeholder="{{ !alarmAssignmentTemplateForm.get('triggerConfig.alarmSeverities').value?.length ? ('alarm.any-severity' | translate) : '' }}">
@ -318,7 +318,7 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>alarm.alarm-status-list</mat-label> <mat-label translate>alarm.alarm-status-list</mat-label>
<mat-select formControlName="alarmStatuses" multiple <mat-select formControlName="alarmStatuses" multiple
placeholder="{{ !alarmAssignmentTemplateForm.get('triggerConfig.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}"> placeholder="{{ !alarmAssignmentTemplateForm.get('triggerConfig.alarmStatuses').value?.length ? ('alarm.any-status' | translate) : '' }}">
@ -328,7 +328,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</fieldset> </fieldset>
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>notification.notify-on</mat-label> <mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple> <mat-select formControlName="notifyOn" multiple>
<mat-option *ngFor="let alarmAssignmentAction of alarmAssignmentActions" [value]="alarmAssignmentAction"> <mat-option *ngFor="let alarmAssignmentAction of alarmAssignmentActions" [value]="alarmAssignmentAction">
@ -365,7 +365,7 @@
hint="{{ 'notification.rule-chain-list-rule-hint' | translate }}" hint="{{ 'notification.rule-chain-list-rule-hint' | translate }}"
[entityType]="entityType.RULE_CHAIN"> [entityType]="entityType.RULE_CHAIN">
</tb-entity-list> </tb-entity-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>rulechain.rulechain-events</mat-label> <mat-label translate>rulechain.rulechain-events</mat-label>
<mat-select formControlName="ruleChainEvents" multiple <mat-select formControlName="ruleChainEvents" multiple
placeholder="{{ !ruleEngineEventsTemplateForm.get('triggerConfig.ruleChainEvents').value?.length ? ('event.all-events' | translate) : '' }}"> placeholder="{{ !ruleEngineEventsTemplateForm.get('triggerConfig.ruleChainEvents').value?.length ? ('event.all-events' | translate) : '' }}">
@ -384,7 +384,7 @@
{{ 'notification.track-rule-node-events' | translate }} {{ 'notification.track-rule-node-events' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
<section *ngIf="ruleEngineEventsTemplateForm.get('triggerConfig.trackRuleNodeEvents').value"> <section *ngIf="ruleEngineEventsTemplateForm.get('triggerConfig.trackRuleNodeEvents').value">
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>rulenode.rule-node-events</mat-label> <mat-label translate>rulenode.rule-node-events</mat-label>
<mat-select formControlName="ruleNodeEvents" multiple <mat-select formControlName="ruleNodeEvents" multiple
placeholder="{{ !ruleEngineEventsTemplateForm.get('triggerConfig.ruleNodeEvents').value?.length ? ('event.all-events' | translate) : '' }}"> placeholder="{{ !ruleEngineEventsTemplateForm.get('triggerConfig.ruleNodeEvents').value?.length ? ('event.all-events' | translate) : '' }}">
@ -425,7 +425,7 @@
hint="{{ 'notification.edge-list-rule-hint' | translate }}" hint="{{ 'notification.edge-list-rule-hint' | translate }}"
[entityType]="entityType.EDGE"> [entityType]="entityType.EDGE">
</tb-entity-list> </tb-entity-list>
<mat-form-field fxFlex class="mat-block" floatLabel="always"> <mat-form-field class="mat-block flex-1" floatLabel="always">
<mat-label translate>notification.notify-on</mat-label> <mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple <mat-select formControlName="notifyOn" multiple
placeholder="{{ !edgeConnectionTemplateForm.get('triggerConfig.notifyOn').value?.length ? ('event.all-events' | translate) : '' }}"> placeholder="{{ !edgeConnectionTemplateForm.get('triggerConfig.notifyOn').value?.length ? ('event.all-events' | translate) : '' }}">
@ -482,11 +482,10 @@
ignoreAuthorityFilter ignoreAuthorityFilter
[allowedEntityTypes]="allowEntityTypeForEntitiesLimit"> [allowedEntityTypes]="allowEntityTypeForEntitiesLimit">
</tb-entity-type-list> </tb-entity-type-list>
<div class="limit-slider-container" fxLayout="row" fxLayoutAlign="start center" <div class="limit-slider-container flex flex-row items-center justify-start xs:flex-col xs:items-stretch">
fxLayout.xs="column" fxLayoutAlign.xs="stretch">
<label translate>notification.threshold</label> <label translate>notification.threshold</label>
<div fxLayout="row" fxLayoutAlign="start center" fxFlex> <div class="flex flex-1 flex-row items-center justify-start">
<mat-slider fxFlex min="0" max="1" step="0.01" discrete [displayWith]="formatLabel"> <mat-slider class="flex-1" min="0" max="1" step="0.01" discrete [displayWith]="formatLabel">
<input matSliderThumb formControlName="threshold"> <input matSliderThumb formControlName="threshold">
</mat-slider> </mat-slider>
<mat-form-field class="limit-slider-value"> <mat-form-field class="limit-slider-value">
@ -514,7 +513,7 @@
<ng-template matStepLabel>{{ 'notification.api-usage-trigger-settings' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.api-usage-trigger-settings' | translate }}</ng-template>
<form [formGroup]="apiUsageLimitTemplateForm"> <form [formGroup]="apiUsageLimitTemplateForm">
<section formGroupName="triggerConfig"> <section formGroupName="triggerConfig">
<mat-form-field fxFlex class="mat-block" subscriptSizing="dynamic"> <mat-form-field class="mat-block flex-1" subscriptSizing="dynamic">
<mat-label translate>api-usage.api-features</mat-label> <mat-label translate>api-usage.api-features</mat-label>
<mat-select formControlName="apiFeatures" multiple> <mat-select formControlName="apiFeatures" multiple>
<mat-option *ngFor="let apiFeature of apiFeatures" [value]="apiFeature"> <mat-option *ngFor="let apiFeature of apiFeatures" [value]="apiFeature">
@ -523,7 +522,7 @@
</mat-select> </mat-select>
<mat-hint>{{ 'notification.api-feature-hint' | translate }}</mat-hint> <mat-hint>{{ 'notification.api-feature-hint' | translate }}</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>notification.notify-on</mat-label> <mat-label translate>notification.notify-on</mat-label>
<mat-select formControlName="notifyOn" multiple> <mat-select formControlName="notifyOn" multiple>
<mat-option *ngFor="let apiUsageStateValue of apiUsageStateValues" [value]="apiUsageStateValue"> <mat-option *ngFor="let apiUsageStateValue of apiUsageStateValues" [value]="apiUsageStateValue">
@ -597,10 +596,10 @@
</mat-horizontal-stepper> </mat-horizontal-stepper>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div mat-dialog-actions fxLayout="row"> <div mat-dialog-actions class="flex flex-row">
<button mat-stroked-button *ngIf="selectedIndex > 0" <button mat-stroked-button *ngIf="selectedIndex > 0"
(click)="backStep()">{{ 'action.back' | translate }}</button> (click)="backStep()">{{ 'action.back' | translate }}</button>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-raised-button <button mat-raised-button
color="primary" color="primary"
(click)="nextStep()">{{ nextStepLabel() | translate }}</button> (click)="nextStep()">{{ nextStepLabel() | translate }}</button>

4
ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<div fxFlex="100" fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-full flex-row items-center justify-end">
<button mat-stroked-button color="primary" (click)="createTarget($event)"> <button mat-stroked-button color="primary" (click)="createTarget($event)">
<div fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start">
<mat-icon>add</mat-icon>{{ 'notification.add-rule' | translate }} <mat-icon>add</mat-icon>{{ 'notification.add-rule' | translate }}
</div> </div>
</button> </button>

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>notification.failed-send</h2> <h2 translate>notification.failed-send</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">

26
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ dialogTitle | translate }}</h2> <h2>{{ dialogTitle | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div tb-help="sentNotification"></div> <div tb-help="sentNotification"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -38,7 +38,7 @@
<mat-step [stepControl]="notificationRequestForm"> <mat-step [stepControl]="notificationRequestForm">
<ng-template matStepLabel>{{ 'notification.setup' | translate }}</ng-template> <ng-template matStepLabel>{{ 'notification.setup' | translate }}</ng-template>
<form [formGroup]="notificationRequestForm"> <form [formGroup]="notificationRequestForm">
<div fxLayoutAlign="center"> <div class="flex items-stretch justify-center">
<tb-toggle-select formControlName="useTemplate" appearance="fill"> <tb-toggle-select formControlName="useTemplate" appearance="fill">
<tb-toggle-option [value]="false">{{ 'notification.start-from-scratch' | translate }}</tb-toggle-option> <tb-toggle-option [value]="false">{{ 'notification.start-from-scratch' | translate }}</tb-toggle-option>
<tb-toggle-option [value]="true">{{ 'notification.use-template' | translate }}</tb-toggle-option> <tb-toggle-option [value]="true">{{ 'notification.use-template' | translate }}</tb-toggle-option>
@ -58,7 +58,7 @@
<section formGroupName="configuration"> <section formGroupName="configuration">
<div class="delivery-title"> <div class="delivery-title">
<div> <div>
<label [ngClass]="{'tb-error': notificationRequestForm.get('template.configuration.deliveryMethodsTemplates').hasError('atLeastOne')}" <label [class.tb-error]="notificationRequestForm.get('template.configuration.deliveryMethodsTemplates').hasError('atLeastOne')"
class="tb-title tb-required">{{ "notification.delivery-methods" | translate }}</label> class="tb-title tb-required">{{ "notification.delivery-methods" | translate }}</label>
<div class="tb-form-hint" translate>notification.at-least-one-should-be-selected</div> <div class="tb-form-hint" translate>notification.at-least-one-should-be-selected</div>
</div> </div>
@ -123,7 +123,7 @@
<mat-slide-toggle formControlName="enabled" class="toggle"> <mat-slide-toggle formControlName="enabled" class="toggle">
{{ 'notification.scheduler-later' | translate }} {{ 'notification.scheduler-later' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
<div *ngIf="notificationRequestForm.get('additionalConfig.enabled').value" fxLayout="column"> <div *ngIf="notificationRequestForm.get('additionalConfig.enabled').value" class="flex flex-col">
<tb-timezone-select userTimezoneByDefault <tb-timezone-select userTimezoneByDefault
required required
formControlName="timezone"> formControlName="timezone">
@ -132,7 +132,7 @@
<mat-label translate>notification.time</mat-label> <mat-label translate>notification.time</mat-label>
<mat-datetimepicker-toggle [for]="startTimePicker" matPrefix></mat-datetimepicker-toggle> <mat-datetimepicker-toggle [for]="startTimePicker" matPrefix></mat-datetimepicker-toggle>
<mat-datetimepicker #startTimePicker type="datetime" openOnFocus="true"></mat-datetimepicker> <mat-datetimepicker #startTimePicker type="datetime" openOnFocus="true"></mat-datetimepicker>
<input required matInput fxFlex formControlName="time" [min]="minDate()" [max]="maxDate()" [matDatetimepicker]="startTimePicker"> <input required matInput class="flex-1" formControlName="time" [min]="minDate()" [max]="maxDate()" [matDatetimepicker]="startTimePicker">
</mat-form-field> </mat-form-field>
</div> </div>
</section> </section>
@ -161,7 +161,7 @@
</div> </div>
<div *ngIf="preview" class="tb-form-panel no-padding no-border"> <div *ngIf="preview" class="tb-form-panel no-padding no-border">
<section class="preview-group tb-form-panel stroked no-gap"> <section class="preview-group tb-form-panel stroked no-gap">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">supervisor_account</tb-icon> <tb-icon class="tb-mat-18">supervisor_account</tb-icon>
<div class="tb-form-panel-title">{{ 'notification.recipients-count' | translate : {count: preview.totalRecipientsCount} }}</div> <div class="tb-form-panel-title">{{ 'notification.recipients-count' | translate : {count: preview.totalRecipientsCount} }}</div>
</div> </div>
@ -178,7 +178,7 @@
</mat-chip-listbox> </mat-chip-listbox>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.WEB?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.WEB?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:bell-badge</tb-icon> <tb-icon class="tb-mat-18">mdi:bell-badge</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.web-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.web-preview</div>
</div> </div>
@ -187,7 +187,7 @@
</div> </div>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.MOBILE_APP?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.MOBILE_APP?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:cellphone-text</tb-icon> <tb-icon class="tb-mat-18">mdi:cellphone-text</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.mobile-app-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.mobile-app-preview</div>
</div> </div>
@ -197,7 +197,7 @@
</div> </div>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.SMS?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.SMS?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:message-processing</tb-icon> <tb-icon class="tb-mat-18">mdi:message-processing</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.sms-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.sms-preview</div>
</div> </div>
@ -206,7 +206,7 @@
</div> </div>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.EMAIL?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.EMAIL?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:email</tb-icon> <tb-icon class="tb-mat-18">mdi:email</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.email-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.email-preview</div>
</div> </div>
@ -217,7 +217,7 @@
</div> </div>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.SLACK?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.SLACK?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:slack</tb-icon> <tb-icon class="tb-mat-18">mdi:slack</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.slack-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.slack-preview</div>
</div> </div>
@ -226,7 +226,7 @@
</div> </div>
</section> </section>
<section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.MICROSOFT_TEAMS?.enabled"> <section class="preview-group notification tb-form-panel stroked no-gap" *ngIf="preview.processedTemplates.MICROSOFT_TEAMS?.enabled">
<div fxLayout="row" fxLayoutGap="8px" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start gap-2">
<tb-icon class="tb-mat-18">mdi:microsoft-teams</tb-icon> <tb-icon class="tb-mat-18">mdi:microsoft-teams</tb-icon>
<div class="tb-form-panel-title" translate>notification.delivery-method.microsoft-teams-preview</div> <div class="tb-form-panel-title" translate>notification.delivery-method.microsoft-teams-preview</div>
</div> </div>
@ -243,7 +243,7 @@
<div mat-dialog-actions class="tb-dialog-actions"> <div mat-dialog-actions class="tb-dialog-actions">
<button mat-stroked-button *ngIf="selectedIndex > 0" <button mat-stroked-button *ngIf="selectedIndex > 0"
(click)="backStep()">{{ 'action.back' | translate }}</button> (click)="backStep()">{{ 'action.back' | translate }}</button>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-raised-button <button mat-raised-button
color="primary" color="primary"
(click)="nextStep()">{{ nextStepLabel() | translate }}</button> (click)="nextStep()">{{ nextStepLabel() | translate }}</button>

12
ui-ngx/src/app/modules/home/pages/notification/settings/notification-setting-form.component.html

@ -15,22 +15,22 @@
limitations under the License. limitations under the License.
--> -->
<form [formGroup]="notificationSettingsFormGroup" fxLayout="column"> <form [formGroup]="notificationSettingsFormGroup" class="flex flex-col">
<div fxLayout="row" style="height: 48px;"> <div class="flex flex-row" style="height: 48px;">
<div fxFlex="50" fxLayoutAlign="start center"> <div class="flex max-w-50% flex-full items-center justify-start">
<mat-checkbox color="primary" <mat-checkbox color="primary"
(click)="$event.stopPropagation()" (click)="$event.stopPropagation()"
(change)="changeInstanceTypeCheckBox($event.checked)" (change)="changeInstanceTypeCheckBox($event.checked)"
[checked]="getChecked()" [checked]="getChecked()"
[indeterminate]="getIndeterminate()"> [indeterminate]="getIndeterminate()">
<span class="notification-type" <span class="notification-type"
[ngClass]="{'notification-type-disabled': !notificationSettingsFormGroup.get('enabled').value}"> [class.notification-type-disabled]="!notificationSettingsFormGroup.get('enabled').value">
{{notificationTemplateTypeTranslateMap.get(notificationSettingsFormGroup.get('name').value)?.name | translate}} {{notificationTemplateTypeTranslateMap.get(notificationSettingsFormGroup.get('name').value)?.name | translate}}
</span> </span>
</mat-checkbox> </mat-checkbox>
</div> </div>
<div fxFlex fxLayout="row" *ngFor="let deliveryMethod of deliveryMethods"> <div class="flex flex-1 flex-row" *ngFor="let deliveryMethod of deliveryMethods">
<div fxFlex fxLayoutAlign="start center"> <div class="flex flex-1 items-center justify-start">
<mat-checkbox color="primary" <mat-checkbox color="primary"
[checked]="getChecked(deliveryMethod)" [checked]="getChecked(deliveryMethod)"
(click)="toggleDeliviryMethod(deliveryMethod)" (click)="toggleDeliviryMethod(deliveryMethod)"

17
ui-ngx/src/app/modules/home/pages/notification/settings/notification-settings.component.html

@ -18,12 +18,11 @@
<div> <div>
<mat-card appearance="outlined" class="settings-card tb-absolute-fill"> <mat-card appearance="outlined" class="settings-card tb-absolute-fill">
<mat-card-header> <mat-card-header>
<div fxFlex fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="8px" <div class="flex flex-1 flex-row items-start justify-between xs:flex-col xs:justify-start xs:gap-2">
fxLayoutAlign="space-between start" fxLayoutAlign.xs="start start"> <div class="flex flex-1 flex-col">
<div fxFlex fxLayout="column">
<span class="mat-headline-5" translate>notification.settings.notification-settings</span> <span class="mat-headline-5" translate>notification.settings.notification-settings</span>
</div> </div>
<div fxLayout="column"> <div class="flex flex-col">
<button mat-button color="primary" <button mat-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="resetSettings()">{{ 'notification.settings.reset-all' | translate }}</button> (click)="resetSettings()">{{ 'notification.settings.reset-all' | translate }}</button>
@ -37,8 +36,8 @@
<form [formGroup]="notificationSettings" class="notification-form"> <form [formGroup]="notificationSettings" class="notification-form">
<section class="notification-section"> <section class="notification-section">
<div class="notification-section-block"> <div class="notification-section-block">
<div fxLayout="row" fxLayoutAlign="start center" style="height: 44px;"> <div class="flex flex-row items-center justify-start" style="height: 44px;">
<div fxFlex="50"> <div class="max-w-50% flex-full">
<mat-checkbox color="warn" <mat-checkbox color="warn"
(click)="$event.stopPropagation()" (click)="$event.stopPropagation()"
[indeterminate]="getIndeterminate()" [indeterminate]="getIndeterminate()"
@ -47,8 +46,8 @@
<mat-label translate>notification.settings.type</mat-label> <mat-label translate>notification.settings.type</mat-label>
</mat-checkbox> </mat-checkbox>
</div> </div>
<div fxFlex *ngFor="let deliveryMethods of notificationDeliveryMethods"> <div class="flex-1" *ngFor="let deliveryMethods of notificationDeliveryMethods">
<div fxFlex fxLayoutAlign="start center"> <div class="flex flex-1 items-center justify-start">
<mat-checkbox color="warn" <mat-checkbox color="warn"
[checked]="getChecked(deliveryMethods)" [checked]="getChecked(deliveryMethods)"
(change)="changeInstanceTypeCheckBox($event.checked, deliveryMethods)" (change)="changeInstanceTypeCheckBox($event.checked, deliveryMethods)"
@ -70,7 +69,7 @@
</section> </section>
</form> </form>
</mat-card-content> </mat-card-content>
<div fxLayout="row" fxLayoutAlign="end start" style="padding: 16px;"> <div class="flex flex-row items-start justify-end" style="padding: 16px;">
<button mat-button mat-raised-button color="primary" <button mat-button mat-raised-button color="primary"
type="button" type="button"
(click)="save()" (click)="save()"

21
ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-action-button-configuration.component.html

@ -18,19 +18,18 @@
<div class="tb-form-panel tb-slide-toggle stroked" [formGroup]="actionButtonConfigForm"> <div class="tb-form-panel tb-slide-toggle stroked" [formGroup]="actionButtonConfigForm">
<mat-expansion-panel class="tb-settings" <mat-expansion-panel class="tb-settings"
[expanded]="actionButtonConfigForm.get('enabled').value"> [expanded]="actionButtonConfigForm.get('enabled').value">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title fxFlex="60"> <mat-panel-title class="max-w-60% flex-full">
<div tb-hint-tooltip-icon="{{ sliderHint }}" class="tb-form-row no-border no-padding"> <div tb-hint-tooltip-icon="{{ sliderHint }}" class="tb-form-row no-border no-padding">
<mat-slide-toggle class="mat-slide" formControlName="enabled" (click)="$event.stopPropagation()" <mat-slide-toggle class="mat-slide flex items-stretch justify-center" formControlName="enabled" (click)="$event.stopPropagation()">
fxLayoutAlign="center">
{{ actionTitle }} {{ actionTitle }}
</mat-slide-toggle> </mat-slide-toggle>
</div> </div>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent class="tb-extension-panel"> <ng-template matExpansionPanelContent class="tb-extension-panel">
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col gt-xs:gap-2">
<mat-form-field class="mat-block" fxFlex *ngIf="!hideButtonText"> <mat-form-field class="mat-block flex-1" *ngIf="!hideButtonText">
<mat-label translate>notification.button-text</mat-label> <mat-label translate>notification.button-text</mat-label>
<input matInput formControlName="text" required> <input matInput formControlName="text" required>
<mat-error <mat-error
@ -45,8 +44,8 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col gt-xs:gap-2">
<mat-form-field fxFlex="30" fxFlex.xs="100"> <mat-form-field class="max-w-30% flex-full xs:max-w-full">
<mat-label translate>notification.action-type</mat-label> <mat-label translate>notification.action-type</mat-label>
<mat-select formControlName="linkType"> <mat-select formControlName="linkType">
<mat-option *ngFor="let actionButtonLinkType of actionButtonLinkTypes" <mat-option *ngFor="let actionButtonLinkType of actionButtonLinkTypes"
@ -55,7 +54,7 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex <mat-form-field class="flex-1"
*ngIf="actionButtonConfigForm.get('linkType').value === actionButtonLinkType.LINK; else dashboardSelector"> *ngIf="actionButtonConfigForm.get('linkType').value === actionButtonLinkType.LINK; else dashboardSelector">
<mat-label translate>notification.link</mat-label> <mat-label translate>notification.link</mat-label>
<input matInput formControlName="link" required> <input matInput formControlName="link" required>
@ -66,11 +65,11 @@
</mat-form-field> </mat-form-field>
<ng-template #dashboardSelector> <ng-template #dashboardSelector>
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex="35" fxFlex.xs="100" class="max-w-35% flex-full xs:max-w-full"
required required
formControlName="dashboardId"> formControlName="dashboardId">
</tb-dashboard-autocomplete> </tb-dashboard-autocomplete>
<tb-dashboard-state-autocomplete fxFlex="35" fxFlex.xs="100" <tb-dashboard-state-autocomplete class="max-w-35% flex-full xs:max-w-full"
[dashboardId]="actionButtonConfigForm.get('dashboardId').value" [dashboardId]="actionButtonConfigForm.get('dashboardId').value"
formControlName="dashboardState"> formControlName="dashboardState">
</tb-dashboard-state-autocomplete> </tb-dashboard-state-autocomplete>

16
ui-ngx/src/app/modules/home/pages/notification/template/configuration/notification-template-configuration.component.html

@ -31,7 +31,7 @@
[formGroupName]="NotificationDeliveryMethod.WEB" [formGroupName]="NotificationDeliveryMethod.WEB"
*ngIf="templateConfigurationForm.get('WEB.enabled').value"> *ngIf="templateConfigurationForm.get('WEB.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.WEB) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.WEB) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.WEB).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.WEB).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.WEB).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.WEB).name | translate }}
@ -62,7 +62,7 @@
<mat-slide-toggle formControlName="enabled" class="mat-slide"> <mat-slide-toggle formControlName="enabled" class="mat-slide">
{{ 'icon.icon' | translate }} {{ 'icon.icon' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"> <div class="flex flex-row items-center justify-start gap-2">
<tb-material-icon-select asBoxInput <tb-material-icon-select asBoxInput
[color]="templateConfigurationForm.get('WEB.additionalConfig.icon.color').value" [color]="templateConfigurationForm.get('WEB.additionalConfig.icon.color').value"
formControlName="icon"> formControlName="icon">
@ -84,7 +84,7 @@
[formGroupName]="NotificationDeliveryMethod.MOBILE_APP" [formGroupName]="NotificationDeliveryMethod.MOBILE_APP"
*ngIf="templateConfigurationForm.get('MOBILE_APP.enabled').value"> *ngIf="templateConfigurationForm.get('MOBILE_APP.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.MOBILE_APP) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.MOBILE_APP) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MOBILE_APP).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MOBILE_APP).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MOBILE_APP).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MOBILE_APP).name | translate }}
@ -125,7 +125,7 @@
<mat-slide-toggle formControlName="enabled" class="mat-slide"> <mat-slide-toggle formControlName="enabled" class="mat-slide">
{{ 'icon.icon' | translate }} {{ 'icon.icon' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"> <div class="flex flex-row items-center justify-start gap-2">
<tb-material-icon-select asBoxInput <tb-material-icon-select asBoxInput
[color]="templateConfigurationForm.get('MOBILE_APP.additionalConfig.icon.color').value" [color]="templateConfigurationForm.get('MOBILE_APP.additionalConfig.icon.color').value"
formControlName="icon"> formControlName="icon">
@ -149,7 +149,7 @@
[formGroupName]="NotificationDeliveryMethod.SMS" [formGroupName]="NotificationDeliveryMethod.SMS"
*ngIf="templateConfigurationForm.get('SMS.enabled').value"> *ngIf="templateConfigurationForm.get('SMS.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.SMS) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.SMS) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SMS).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SMS).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SMS).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SMS).name | translate }}
@ -181,7 +181,7 @@
[formGroupName]="NotificationDeliveryMethod.EMAIL" [formGroupName]="NotificationDeliveryMethod.EMAIL"
*ngIf="templateConfigurationForm.get('EMAIL.enabled').value"> *ngIf="templateConfigurationForm.get('EMAIL.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.EMAIL) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.EMAIL) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.EMAIL).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.EMAIL).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.EMAIL).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.EMAIL).name | translate }}
@ -211,7 +211,7 @@
[formGroupName]="NotificationDeliveryMethod.SLACK" [formGroupName]="NotificationDeliveryMethod.SLACK"
*ngIf="templateConfigurationForm.get('SLACK.enabled').value"> *ngIf="templateConfigurationForm.get('SLACK.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.SLACK) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.SLACK) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SLACK).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SLACK).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SLACK).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.SLACK).name | translate }}
@ -237,7 +237,7 @@
[formGroupName]="NotificationDeliveryMethod.MICROSOFT_TEAMS" [formGroupName]="NotificationDeliveryMethod.MICROSOFT_TEAMS"
*ngIf="templateConfigurationForm.get('MICROSOFT_TEAMS.enabled').value"> *ngIf="templateConfigurationForm.get('MICROSOFT_TEAMS.enabled').value">
<mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.MICROSOFT_TEAMS) }}"> <mat-expansion-panel class="tb-settings" expanded="{{ expandedForm(NotificationDeliveryMethod.MICROSOFT_TEAMS) }}">
<mat-expansion-panel-header fxLayout="row wrap" class="fill-width"> <mat-expansion-panel-header class="fill-width flex flex-row flex-wrap">
<mat-panel-title class="template-tittle"> <mat-panel-title class="template-tittle">
<tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MICROSOFT_TEAMS).icon }}</tb-icon> <tb-icon>{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MICROSOFT_TEAMS).icon }}</tb-icon>
{{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MICROSOFT_TEAMS).name | translate }} {{ NotificationDeliveryMethodInfoMap.get(NotificationDeliveryMethod.MICROSOFT_TEAMS).name | translate }}

8
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html

@ -17,7 +17,7 @@
--> -->
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2>{{ dialogTitle | translate }}</h2> <h2>{{ dialogTitle | translate }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div tb-help="templateNotifications"></div> <div tb-help="templateNotifications"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -45,7 +45,7 @@
{{ 'notification.name-required' | translate }} {{ 'notification.name-required' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex class="mat-block" *ngIf="!hideSelectType"> <mat-form-field class="mat-block flex-1" *ngIf="!hideSelectType">
<mat-label translate>notification.type</mat-label> <mat-label translate>notification.type</mat-label>
<mat-select formControlName="notificationType"> <mat-select formControlName="notificationType">
<mat-option *ngFor="let notificationType of notificationTypes" [value]="notificationType"> <mat-option *ngFor="let notificationType of notificationTypes" [value]="notificationType">
@ -54,7 +54,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<section formGroupName="configuration"> <section formGroupName="configuration">
<label [ngClass]="{'tb-error': templateNotificationForm.get('configuration.deliveryMethodsTemplates').hasError('atLeastOne')}" <label [class.tb-error]="templateNotificationForm.get('configuration.deliveryMethodsTemplates').hasError('atLeastOne')"
class="tb-title tb-required">{{ "notification.delivery-methods" | translate }}</label> class="tb-title tb-required">{{ "notification.delivery-methods" | translate }}</label>
<div class="tb-hint" translate>notification.at-least-one-should-be-selected</div> <div class="tb-hint" translate>notification.at-least-one-should-be-selected</div>
<section formGroupName="deliveryMethodsTemplates" class="delivery-methods-container"> <section formGroupName="deliveryMethodsTemplates" class="delivery-methods-container">
@ -88,7 +88,7 @@
<div mat-dialog-actions class="tb-dialog-actions"> <div mat-dialog-actions class="tb-dialog-actions">
<button mat-stroked-button *ngIf="selectedIndex > 0" <button mat-stroked-button *ngIf="selectedIndex > 0"
(click)="backStep()">{{ 'action.back' | translate }}</button> (click)="backStep()">{{ 'action.back' | translate }}</button>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-raised-button <button mat-raised-button
color="primary" color="primary"
(click)="nextStep()">{{ nextStepLabel() | translate }}</button> (click)="nextStep()">{{ nextStepLabel() | translate }}</button>

4
ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<div fxFlex="100" fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-full flex-row items-center justify-end">
<button mat-stroked-button color="primary" (click)="createTemplate($event)"> <button mat-stroked-button color="primary" (click)="createTemplate($event)">
<div fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start">
<mat-icon>add</mat-icon>{{ 'notification.add-template' | translate }} <mat-icon>add</mat-icon>{{ 'notification.add-template' | translate }}
</div> </div>
</button> </button>

54
ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.html

@ -15,31 +15,31 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" fxFlex.xs <button mat-raised-button color="primary" class="xs:flex-1"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" fxFlex.xs <button mat-raised-button color="primary" class="xs:flex-1"
[disabled]="(isLoading$ | async) || !(entity?.hasData && !entity?.url)" [disabled]="(isLoading$ | async) || !(entity?.hasData && !entity?.url)"
(click)="onEntityAction($event, 'uploadPackage')" (click)="onEntityAction($event, 'uploadPackage')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ 'ota-update.download' | translate }} {{ 'ota-update.download' | translate }}
</button> </button>
<button mat-raised-button color="primary" fxFlex.xs <button mat-raised-button color="primary" class="xs:flex-1"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{ 'ota-update.delete' | translate }} {{ 'ota-update.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onPackageIdCopied()" (cbOnSuccess)="onPackageIdCopied()"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>ota-update.copyId</span> <span translate>ota-update.copyId</span>
</button> </button>
@ -47,7 +47,7 @@
ngxClipboard ngxClipboard
(cbOnSuccess)="onPackageChecksumCopied()" (cbOnSuccess)="onPackageChecksumCopied()"
[cbContent]="entity?.checksum" [cbContent]="entity?.checksum"
[fxShow]="!isEdit && entity?.checksum"> [class.!hidden]="isEdit || !entity?.checksum">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>ota-update.copy-checksum</span> <span translate>ota-update.copy-checksum</span>
</button> </button>
@ -55,17 +55,17 @@
ngxClipboard ngxClipboard
(cbOnSuccess)="onPackageDirectUrlCopied()" (cbOnSuccess)="onPackageDirectUrlCopied()"
[cbContent]="entity?.url" [cbContent]="entity?.url"
[fxShow]="!isEdit && entity?.url"> [class.!hidden]="isEdit || !entity?.url">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>ota-update.copy-direct-url</span> <span translate>ota-update.copy-direct-url</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column" fxLayoutGap="8px"> <div class="mat-padding flex flex-col gap-2">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit" fxLayout="column"> <fieldset [disabled]="(isLoading$ | async) || !isEdit" class="flex flex-col">
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col gt-xs:gap-2">
<mat-form-field class="mat-block" fxFlex="45"> <mat-form-field class="mat-block max-w-45% flex-full">
<mat-label translate>ota-update.title</mat-label> <mat-label translate>ota-update.title</mat-label>
<input matInput formControlName="title" type="text" required [readonly]="!isAdd"> <input matInput formControlName="title" type="text" required [readonly]="!isAdd">
<mat-error *ngIf="entityForm.get('title').hasError('required')"> <mat-error *ngIf="entityForm.get('title').hasError('required')">
@ -75,7 +75,7 @@
{{ 'ota-update.title-max-length' | translate }} {{ 'ota-update.title-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>ota-update.version</mat-label> <mat-label translate>ota-update.version</mat-label>
<input matInput formControlName="version" type="text" required [readonly]="!isAdd"> <input matInput formControlName="version" type="text" required [readonly]="!isAdd">
<mat-error *ngIf="entityForm.get('version').hasError('required')"> <mat-error *ngIf="entityForm.get('version').hasError('required')">
@ -86,7 +86,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<mat-form-field class="mat-block" fxFlex style="margin-bottom: 8px"> <mat-form-field class="mat-block flex-1" style="margin-bottom: 8px">
<mat-label translate>ota-update.version-tag</mat-label> <mat-label translate>ota-update.version-tag</mat-label>
<input matInput formControlName="tag" type="text" [readonly]="!isAdd"> <input matInput formControlName="tag" type="text" [readonly]="!isAdd">
<mat-hint *ngIf="isAdd" translate>ota-update.version-tag-hint</mat-hint> <mat-hint *ngIf="isAdd" translate>ota-update.version-tag-hint</mat-hint>
@ -94,7 +94,8 @@
<tb-device-profile-autocomplete <tb-device-profile-autocomplete
formControlName="deviceProfileId" formControlName="deviceProfileId"
required required
[ngStyle]="{'padding-bottom': isAdd ? '16px': 0}" [class.pb-4]="isAdd"
[class.pb-0]="!isAdd"
[hint]="'ota-update.chose-compatible-device-profile'" [hint]="'ota-update.chose-compatible-device-profile'"
[editProfileEnabled]="false" [editProfileEnabled]="false"
[addNewProfile]="false" [addNewProfile]="false"
@ -110,7 +111,7 @@
</mat-form-field> </mat-form-field>
<section *ngIf="isAdd"> <section *ngIf="isAdd">
<div class="mat-caption" style="margin: -8px 0 8px;" translate>ota-update.warning-after-save-no-edit</div> <div class="mat-caption" style="margin: -8px 0 8px;" translate>ota-update.warning-after-save-no-edit</div>
<mat-radio-group formControlName="isURL" fxLayoutGap="16px"> <mat-radio-group formControlName="isURL" class="gap-4">
<mat-radio-button [value]="false">{{ "ota-update.upload-binary-file" | translate }}</mat-radio-button> <mat-radio-button [value]="false">{{ "ota-update.upload-binary-file" | translate }}</mat-radio-button>
<mat-radio-button [value]="true">{{ "ota-update.use-external-url" | translate }}</mat-radio-button> <mat-radio-button [value]="true">{{ "ota-update.use-external-url" | translate }}</mat-radio-button>
</mat-radio-group> </mat-radio-group>
@ -128,10 +129,9 @@
{{ 'ota-update.auto-generate-checksum' | translate }} {{ 'ota-update.auto-generate-checksum' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>
<div fxLayout="row" fxLayoutGap.gt-xs="8px" fxLayoutGap.sm="8px" <div class="flex flex-row xs:flex-col sm:gap-2 md:flex-col gt-xs:gap-2"
fxLayout.xs="column" fxLayout.md="column"
*ngIf="!(isAdd && this.entityForm.get('generateChecksum').value)"> *ngIf="!(isAdd && this.entityForm.get('generateChecksum').value)">
<mat-form-field class="mat-block" fxFlex="33"> <mat-form-field class="mat-block max-w-33% flex-full">
<mat-label translate>ota-update.checksum-algorithm</mat-label> <mat-label translate>ota-update.checksum-algorithm</mat-label>
<mat-select formControlName="checksumAlgorithm"> <mat-select formControlName="checksumAlgorithm">
<mat-option *ngFor="let checksumAlgorithm of checksumAlgorithms" [value]="checksumAlgorithm"> <mat-option *ngFor="let checksumAlgorithm of checksumAlgorithms" [value]="checksumAlgorithm">
@ -139,23 +139,23 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>ota-update.checksum</mat-label> <mat-label translate>ota-update.checksum</mat-label>
<input matInput formControlName="checksum" type="text"> <input matInput formControlName="checksum" type="text">
<mat-hint *ngIf="isAdd" translate>ota-update.checksum-hint</mat-hint> <mat-hint *ngIf="isAdd" translate>ota-update.checksum-hint</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
<section *ngIf="!isAdd"> <section *ngIf="!isAdd">
<div fxLayout="row" fxLayoutGap.gt-md="8px" fxLayoutGap.sm="8px" fxLayout.xs="column" fxLayout.md="column"> <div class="flex flex-row xs:flex-col sm:gap-2 md:flex-col gt-md:gap-2">
<mat-form-field class="mat-block" fxFlex="33"> <mat-form-field class="mat-block max-w-33% flex-full">
<mat-label translate>ota-update.file-name</mat-label> <mat-label translate>ota-update.file-name</mat-label>
<input matInput formControlName="fileName" type="text"> <input matInput formControlName="fileName" type="text">
</mat-form-field> </mat-form-field>
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>ota-update.file-size-bytes</mat-label> <mat-label translate>ota-update.file-size-bytes</mat-label>
<input matInput formControlName="dataSize" type="text"> <input matInput formControlName="dataSize" type="text">
</mat-form-field> </mat-form-field>
<mat-form-field class="mat-block" fxFlex> <mat-form-field class="mat-block flex-1">
<mat-label translate>ota-update.content-type</mat-label> <mat-label translate>ota-update.content-type</mat-label>
<input matInput formControlName="contentType" type="text"> <input matInput formControlName="contentType" type="text">
</mat-form-field> </mat-form-field>

15
ui-ngx/src/app/modules/home/pages/profile/profile.component.html

@ -18,13 +18,12 @@
<div> <div>
<mat-card appearance="outlined" class="profile-card"> <mat-card appearance="outlined" class="profile-card">
<mat-card-header> <mat-card-header>
<div fxFlex fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="8px" <div class="flex flex-1 flex-row items-start justify-between xs:flex-col xs:justify-start xs:gap-2">
fxLayoutAlign="space-between start" fxLayoutAlign.xs="start start"> <div class="flex flex-1 flex-col">
<div fxFlex fxLayout="column">
<span class="mat-headline-5" translate>profile.profile</span> <span class="mat-headline-5" translate>profile.profile</span>
<span class="profile-email" style='opacity: 0.7;'>{{ profile ? profile.get('email').value : '' }}</span> <span class="profile-email" style='opacity: 0.7;'>{{ profile ? profile.get('email').value : '' }}</span>
</div> </div>
<div fxLayout="column"> <div class="flex flex-col">
<span class="mat-mdc-subheader" translate>profile.last-login-time</span> <span class="mat-mdc-subheader" translate>profile.last-login-time</span>
<span class="profile-last-login-ts" style='opacity: 0.7;'>{{ user?.additionalInfo?.lastLoginTs | date:'yyyy-MM-dd HH:mm:ss' }}</span> <span class="profile-last-login-ts" style='opacity: 0.7;'>{{ user?.additionalInfo?.lastLoginTs | date:'yyyy-MM-dd HH:mm:ss' }}</span>
</div> </div>
@ -67,9 +66,9 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<section class="tb-home-dashboard" fxFlex fxLayout="column" fxLayout.gt-sm="row" *ngIf="!isSysAdmin()"> <section class="tb-home-dashboard flex flex-1 flex-col gt-sm:flex-row" *ngIf="!isSysAdmin()">
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex class="flex-1"
label="{{ 'dashboard.home-dashboard' | translate }}" label="{{ 'dashboard.home-dashboard' | translate }}"
formControlName="homeDashboardId" formControlName="homeDashboardId"
[dashboardsScope]="user?.authority === authorities.TENANT_ADMIN ? 'tenant' : 'customer'" [dashboardsScope]="user?.authority === authorities.TENANT_ADMIN ? 'tenant' : 'customer'"
@ -77,11 +76,11 @@
[customerId]="user?.customerId?.id" [customerId]="user?.customerId?.id"
[selectFirstDashboard]="false" [selectFirstDashboard]="false"
></tb-dashboard-autocomplete> ></tb-dashboard-autocomplete>
<mat-checkbox fxFlex formControlName="homeDashboardHideToolbar"> <mat-checkbox class="flex-1" formControlName="homeDashboardHideToolbar">
{{ 'dashboard.home-dashboard-hide-toolbar' | translate }} {{ 'dashboard.home-dashboard-hide-toolbar' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>
<div fxLayout="row" fxLayoutAlign="end start"> <div class="flex flex-row items-start justify-end">
<button mat-button mat-raised-button color="primary" <button mat-button mat-raised-button color="primary"
type="submit" type="submit"
[disabled]="(isLoading$ | async) || profile.invalid || !profile.dirty"> [disabled]="(isLoading$ | async) || profile.invalid || !profile.dirty">

4
ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html

@ -18,7 +18,7 @@
<form (ngSubmit)="add()" class="dialog-container"> <form (ngSubmit)="add()" class="dialog-container">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>rulenode.add</h2> <h2 translate>rulenode.add</h2>
<span fxFlex>: {{ruleNode.component.name}}</span> <span class="flex-1">: {{ruleNode.component.name}}</span>
<div [tb-help]="helpLinkIdForRuleNodeType()"></div> <div [tb-help]="helpLinkIdForRuleNodeType()"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -36,7 +36,7 @@
isAdd> isAdd>
</tb-rule-node> </tb-rule-node>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

4
ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-link-dialog.component.html

@ -18,7 +18,7 @@
<form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 480px;"> <form [formGroup]="ruleNodeLinkFormGroup" (ngSubmit)="add()" style="width: 480px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>rulenode.add-link</h2> <h2 translate>rulenode.add-link</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div [tb-help]="'ruleEngine'"></div> <div [tb-help]="'ruleEngine'"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -39,7 +39,7 @@
</tb-rule-node-link> </tb-rule-node-link>
</fieldset> </fieldset>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

6
ui-ngx/src/app/modules/home/pages/rulechain/create-nested-rulechain-dialog.component.html

@ -18,7 +18,7 @@
<form (ngSubmit)="add()" style="min-width: 650px;"> <form (ngSubmit)="add()" style="min-width: 650px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>rulenode.create-nested-rulechain</h2> <h2 translate>rulenode.create-nested-rulechain</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -30,7 +30,7 @@
<div mat-dialog-content> <div mat-dialog-content>
<form [formGroup]="createNestedRuleChainFormGroup" class="mat-padding"> <form [formGroup]="createNestedRuleChainFormGroup" class="mat-padding">
<fieldset [disabled]="isLoading$ | async"> <fieldset [disabled]="isLoading$ | async">
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>rulechain.name</mat-label> <mat-label translate>rulechain.name</mat-label>
<input matInput formControlName="name" required> <input matInput formControlName="name" required>
<mat-error *ngIf="createNestedRuleChainFormGroup.get('name').hasError('required')"> <mat-error *ngIf="createNestedRuleChainFormGroup.get('name').hasError('required')">
@ -49,7 +49,7 @@
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

2
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.html

@ -23,7 +23,7 @@
</div> </div>
<form [formGroup]="ruleNodeFormGroup" class="mat-padding"> <form [formGroup]="ruleNodeFormGroup" class="mat-padding">
<section class="title-row"> <section class="title-row">
<mat-form-field fxFlex class="mat-block"> <mat-form-field class="mat-block flex-1">
<mat-label translate>rulenode.name</mat-label> <mat-label translate>rulenode.name</mat-label>
<input matInput formControlName="name" required> <input matInput formControlName="name" required>
<mat-error *ngIf="ruleNodeFormGroup.get('name').hasError('required') <mat-error *ngIf="ruleNodeFormGroup.get('name').hasError('required')

2
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-link.component.html

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="ruleNodeLinkFormGroup"> <form [formGroup]="ruleNodeLinkFormGroup">
<tb-link-labels <tb-link-labels
required required

39
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html

@ -15,22 +15,21 @@
limitations under the License. limitations under the License.
--> -->
<div class="mat-content tb-rulechain" fxFlex tb-fullscreen [fullscreen]="isFullscreen" [tb-hotkeys]="hotKeys" <div class="mat-content tb-rulechain flex flex-1 flex-col" tb-fullscreen [fullscreen]="isFullscreen" [tb-hotkeys]="hotKeys"
[cheatSheet]="cheatSheetComponent" fxLayout="column"> [cheatSheet]="cheatSheetComponent">
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet> <tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
<section class="tb-rulechain-container" fxFlex fxLayout="column"> <section class="tb-rulechain-container flex flex-1 flex-col">
<div class="tb-rulechain-layout" fxFlex fxLayout="row"> <div class="tb-rulechain-layout flex flex-1 flex-row">
<mat-drawer-container style="width: 100%; height: 100%;"> <mat-drawer-container class="size-full">
<mat-drawer class="tb-rulechain-library mat-elevation-z4" <mat-drawer class="tb-rulechain-library mat-elevation-z4 flex flex-col"
disableClose="true" disableClose="true"
mode="side" mode="side"
#drawer #drawer
opened opened
position="start" position="start">
fxLayout="column">
<mat-toolbar color="primary" class="tb-dark"> <mat-toolbar color="primary" class="tb-dark">
<tb-rule-chain-select <tb-rule-chain-select
fxFlex class="flex-1"
*ngIf="!isImport" *ngIf="!isImport"
[ruleChainType]="ruleChainType" [ruleChainType]="ruleChainType"
[disabled]="isDirtyValue" [disabled]="isDirtyValue"
@ -40,7 +39,7 @@
</mat-toolbar> </mat-toolbar>
<mat-toolbar> <mat-toolbar>
<div class="mat-toolbar-tools"> <div class="mat-toolbar-tools">
<mat-form-field fxFlex class="tb-appearance-transparent"> <mat-form-field class="tb-appearance-transparent flex-1">
<button mat-icon-button matPrefix class="tb-small" <button mat-icon-button matPrefix class="tb-small"
matTooltip="{{'rulenode.search' | translate}}" matTooltip="{{'rulenode.search' | translate}}"
matTooltipPosition="above"> matTooltipPosition="above">
@ -50,7 +49,7 @@
[formControl]="ruleNodeTypeSearch" [formControl]="ruleNodeTypeSearch"
placeholder="{{'rulenode.search' | translate}}"/> placeholder="{{'rulenode.search' | translate}}"/>
<button mat-icon-button matSuffix class="tb-small" <button mat-icon-button matSuffix class="tb-small"
[fxShow]="ruleNodeTypeSearch.value !== ''" [class.!hidden]="ruleNodeTypeSearch.value === ''"
(click)="ruleNodeTypeSearch.reset()" (click)="ruleNodeTypeSearch.reset()"
matTooltip="{{'action.clear-search' | translate}}" matTooltip="{{'action.clear-search' | translate}}"
matTooltipPosition="above"> matTooltipPosition="above">
@ -89,7 +88,7 @@
(closed)="onDetailsDrawerClosed()" (closed)="onDetailsDrawerClosed()"
mode="over" mode="over"
position="end"> position="end">
<tb-details-panel *ngIf="editingRuleNode" fxFlex <tb-details-panel *ngIf="editingRuleNode" class="flex-1"
headerTitle="{{editingRuleNode.name}}" headerTitle="{{editingRuleNode.name}}"
headerSubtitle="{{ headerSubtitle="{{
(ruleNodeTypeDescriptorsMap.get(editingRuleNode.component.type).name | translate) (ruleNodeTypeDescriptorsMap.get(editingRuleNode.component.type).name | translate)
@ -104,7 +103,7 @@
<div class="details-buttons"> <div class="details-buttons">
<div [tb-help]="helpLinkIdForRuleNodeType()"></div> <div [tb-help]="helpLinkIdForRuleNodeType()"></div>
</div> </div>
<mat-tab-group fxFlex mat-stretch-tabs="false" class="tb-absolute-fill tb-rulenode-details" [(selectedIndex)]="selectedRuleNodeTabIndex"> <mat-tab-group mat-stretch-tabs="false" class="tb-absolute-fill tb-rulenode-details flex-1" [(selectedIndex)]="selectedRuleNodeTabIndex">
<mat-tab label="{{ 'rulenode.details' | translate }}"> <mat-tab label="{{ 'rulenode.details' | translate }}">
<tb-rule-node #tbRuleNode <tb-rule-node #tbRuleNode
[ruleNode]="editingRuleNode" [ruleNode]="editingRuleNode"
@ -126,7 +125,7 @@
</mat-tab> </mat-tab>
<mat-tab label="{{ 'rulenode.help' | translate }}"> <mat-tab label="{{ 'rulenode.help' | translate }}">
<div class="tb-rule-node-help"> <div class="tb-rule-node-help">
<div id="tb-node-content" class="mat-padding" fxLayout="column"> <div id="tb-node-content" class="mat-padding flex flex-col">
<div class="tb-node-title">{{editingRuleNode.component.name}}</div> <div class="tb-node-title">{{editingRuleNode.component.name}}</div>
<div>&nbsp;</div> <div>&nbsp;</div>
<div class="tb-node-description" [innerHtml]="editingRuleNode.component.configurationDescriptor.nodeDefinition.description | safe: 'html'"></div> <div class="tb-node-description" [innerHtml]="editingRuleNode.component.configurationDescriptor.nodeDefinition.description | safe: 'html'"></div>
@ -137,7 +136,7 @@
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</tb-details-panel> </tb-details-panel>
<tb-details-panel *ngIf="editingRuleNodeLink" fxFlex <tb-details-panel *ngIf="editingRuleNodeLink" class="flex-1"
headerTitle="{{editingRuleNodeLink.label}}" headerTitle="{{editingRuleNodeLink.label}}"
headerSubtitle="{{'rulenode.link-details' | translate}}" headerSubtitle="{{'rulenode.link-details' | translate}}"
[isReadOnly]="false" [isReadOnly]="false"
@ -150,7 +149,7 @@
<div [tb-help]="'ruleEngine'"></div> <div [tb-help]="'ruleEngine'"></div>
</div> </div>
<tb-rule-node-link <tb-rule-node-link
fxFlex class="flex-1"
#tbRuleNodeLink #tbRuleNodeLink
[(ngModel)]="editingRuleNodeLink" [(ngModel)]="editingRuleNodeLink"
[allowedLabels]="editingRuleNodeLinkLabels" [allowedLabels]="editingRuleNodeLinkLabels"
@ -166,7 +165,7 @@
(click)="drawer.toggle();" (click)="drawer.toggle();"
matTooltip="{{ (drawer.opened ? 'rulenode.close-node-library' : 'rulenode.open-node-library') | translate }}" matTooltip="{{ (drawer.opened ? 'rulenode.close-node-library' : 'rulenode.open-node-library') | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
<mat-icon class="tb-library-node-btn-icon" [ngClass]="{'tb-library-node-btn-icon-toggled' : drawer.opened}">chevron_right</mat-icon> <mat-icon class="tb-library-node-btn-icon" [class.tb-library-node-btn-icon-toggled]="drawer.opened">chevron_right</mat-icon>
</button> </button>
<button #versionControlButton <button #versionControlButton
*ngIf="!isImport" *ngIf="!isImport"
@ -198,7 +197,7 @@
<div class="tb-context-menu-header {{contextInfo.headerClass}}"> <div class="tb-context-menu-header {{contextInfo.headerClass}}">
<mat-icon *ngIf="!contextInfo.iconUrl">{{contextInfo.icon}}</mat-icon> <mat-icon *ngIf="!contextInfo.iconUrl">{{contextInfo.icon}}</mat-icon>
<img *ngIf="contextInfo.iconUrl" [src]="contextInfo.iconUrl"/> <img *ngIf="contextInfo.iconUrl" [src]="contextInfo.iconUrl"/>
<div fxFlex> <div class="flex-1">
<div class="tb-context-menu-title">{{contextInfo.title}}</div> <div class="tb-context-menu-title">{{contextInfo.title}}</div>
<div class="tb-context-menu-subtitle">{{contextInfo.subtitle}}</div> <div class="tb-context-menu-subtitle">{{contextInfo.subtitle}}</div>
</div> </div>
@ -231,10 +230,10 @@
[userCallbacks]="editCallbacks"> [userCallbacks]="editCallbacks">
</fc-canvas> </fc-canvas>
</div> </div>
<section fxLayout="row" class="layout-wrap tb-footer-buttons" fxLayoutAlign="start end"> <section class="tb-footer-buttons flex flex-row flex-wrap items-end justify-start">
<button [disabled]="isLoading$ | async" <button [disabled]="isLoading$ | async"
mat-fab color="accent" class="tb-btn-footer" mat-fab color="accent" class="tb-btn-footer"
[ngClass]="{'tb-hide': !objectsSelected()}" [class.tb-hide]="!objectsSelected()"
(click)="deleteSelected()" (click)="deleteSelected()"
matTooltip="{{ 'rulenode.delete-selected-objects' | translate }}" matTooltip="{{ 'rulenode.delete-selected-objects' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">

24
ui-ngx/src/app/modules/home/pages/rulechain/rulechain.component.html

@ -19,63 +19,63 @@
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'rulechain.open-rulechain' | translate }} {{'rulechain.open-rulechain' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'export')" (click)="onEntityAction($event, 'export')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'rulechain.export' | translate }} {{'rulechain.export' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'setRoot')" (click)="onEntityAction($event, 'setRoot')"
[fxShow]="!isEdit && ((!entity?.root && ruleChainScope === 'tenant') || (!isEdgeRootRuleChain() && ruleChainScope === 'edge'))"> [class.!hidden]="isEdit || !((!entity?.root && ruleChainScope === 'tenant') || (!isEdgeRootRuleChain() && ruleChainScope === 'edge'))">
{{'rulechain.set-root' | translate }} {{'rulechain.set-root' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'setEdgeTemplateRoot')" (click)="onEntityAction($event, 'setEdgeTemplateRoot')"
[fxShow]="!isEdit && !entity?.root && ruleChainScope === 'edges'"> [class.!hidden]="isEdit || entity?.root || ruleChainScope !== 'edges'">
{{'rulechain.set-edge-template-root-rulechain' | translate }} {{'rulechain.set-edge-template-root-rulechain' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'setAutoAssignToEdge')" (click)="onEntityAction($event, 'setAutoAssignToEdge')"
[fxShow]="!isEdit && isNotAutoAssignToEdgeRuleChain() && ruleChainScope === 'edges'"> [class.!hidden]="isEdit || !isNotAutoAssignToEdgeRuleChain() || ruleChainScope !== 'edges'">
{{'rulechain.set-auto-assign-to-edge' | translate }} {{'rulechain.set-auto-assign-to-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unsetAutoAssignToEdge')" (click)="onEntityAction($event, 'unsetAutoAssignToEdge')"
[fxShow]="!isEdit && isAutoAssignToEdgeRuleChain() && ruleChainScope === 'edges'"> [class.!hidden]="isEdit || !isAutoAssignToEdgeRuleChain() || ruleChainScope !== 'edges'">
{{'rulechain.unset-auto-assign-to-edge' | translate }} {{'rulechain.unset-auto-assign-to-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'unassignFromEdge')" (click)="onEntityAction($event, 'unassignFromEdge')"
[fxShow]="!isEdit && !isEdgeRootRuleChain() && ruleChainScope === 'edge'"> [class.!hidden]="isEdit || isEdgeRootRuleChain() || ruleChainScope !== 'edges'">
{{'edge.unassign-from-edge' | translate }} {{'edge.unassign-from-edge' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit && ruleChainScope !== 'edge'"> [class.!hidden]="hideDelete() || isEdit || ruleChainScope === 'edge'">
{{'rulechain.delete' | translate }} {{'rulechain.delete' | translate }}
</button> </button>
<div fxLayout="row"> <div class="flex flex-row">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onRuleChainIdCopied($event)" (cbOnSuccess)="onRuleChainIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>rulechain.copyId</span> <span translate>rulechain.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
@ -88,7 +88,7 @@
{{ 'rulechain.name-max-length' | translate }} {{ 'rulechain.name-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-checkbox fxFlex formControlName="debugMode" style="padding-bottom: 16px;"> <mat-checkbox class="flex-1" formControlName="debugMode" style="padding-bottom: 16px;">
{{ 'rulechain.debug-mode' | translate }} {{ 'rulechain.debug-mode' | translate }}
</mat-checkbox> </mat-checkbox>
<div formGroupName="additionalInfo"> <div formGroupName="additionalInfo">

10
ui-ngx/src/app/modules/home/pages/rulechain/rulenode.component.html

@ -22,11 +22,11 @@
(mouseleave)="userNodeCallbacks.mouseLeave($event, node)"> (mouseleave)="userNodeCallbacks.mouseLeave($event, node)">
<div class="fc-node-overlay"></div> <div class="fc-node-overlay"></div>
<div class="tb-rule-node {{node.nodeClass}}" <div class="tb-rule-node {{node.nodeClass}}"
[ngClass]="{'tb-rule-node-highlighted' : node.highlighted, [class.tb-rule-node-highlighted]="node.highlighted"
'tb-rule-node-invalid': node.error }"> [class.tb-rule-node-invalid]="node.error">
<mat-icon *ngIf="!iconUrl" fxFlex="15">{{node.icon}}</mat-icon> <mat-icon *ngIf="!iconUrl" class="max-w-15% flex-full">{{node.icon}}</mat-icon>
<img *ngIf="iconUrl" fxFlex="15" [src]="iconUrl"/> <img *ngIf="iconUrl" class="max-w-15% flex-full" [src]="iconUrl"/>
<div fxLayout="column" fxFlex="85" fxLayoutAlign="center"> <div class="flex max-w-85% flex-full flex-col items-stretch justify-center">
<span class="tb-node-type">{{ node.component.name }}</span> <span class="tb-node-type">{{ node.component.name }}</span>
<span class="tb-node-title" *ngIf="node.name">{{ node.name }}</span> <span class="tb-node-title" *ngIf="node.name">{{ node.name }}</span>
</div> </div>

Loading…
Cancel
Save