@ -19,35 +19,37 @@
< div fxFlex fxLayout = "column" class = "mat-elevation-z1 tb-entity-table-content" >
< mat-toolbar class = "mat-table-toolbar" [ fxShow ] = " mode = == ' default ' & & ! textSearchMode & & dataSource . selection . isEmpty ( ) " >
< div class = "mat-toolbar-tools" >
< span class = "tb-entity-table-title" > {{telemetryTypeTranslationsMap.get(attributeScope) | translate}}< / span >
< mat-form-field class = "mat-block tb-attribute-scope" style = "width: 200px;" * ngIf = "!disableAttributeScopeSelection" >
< mat-label translate > attribute.attributes-scope< / mat-label >
< mat-select [ disabled ] = " ( isLoading $ | async ) | | attributeScopeSelectionReadonly "
matInput [ngModel]="attributeScope"
(ngModelChange)="attributeScopeChanged($event)">
< mat-option * ngFor = "let scope of attributeScopes" [ value ] = " scope " >
{{ telemetryTypeTranslationsMap.get(toTelemetryTypeFunc(scope)) | translate }}
< / mat-option >
< / mat-select >
< / mat-form-field >
< div fxLayout = "row" fxLayoutAlign = "start center" fxLayout . xs = "column" fxLayoutAlign . xs = "center start" class = "title-container" >
< span class = "tb-entity-table-title" > {{telemetryTypeTranslationsMap.get(attributeScope) | translate}}< / span >
< mat-form-field class = "mat-block tb-attribute-scope" * ngIf = "!disableAttributeScopeSelection" >
< mat-label translate > attribute.attributes-scope< / mat-label >
< mat-select [ disabled ] = " ( isLoading $ | async ) | | attributeScopeSelectionReadonly "
[ngModel]="attributeScope"
(ngModelChange)="attributeScopeChanged($event)">
< mat-option * ngFor = "let scope of attributeScopes" [ value ] = " scope " >
{{ telemetryTypeTranslationsMap.get(toTelemetryTypeFunc(scope)) | translate }}
< / mat-option >
< / mat-select >
< / mat-form-field >
< / div >
< span fxFlex > < / span >
< button * ngIf = "!isClientSideTelemetryTypeMap.get(attributeScope)"
mat-button mat-icon-button
< button mat-icon-button
*ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)"
[disabled]="isLoading$ | async"
(click)="addAttribute($event)"
matTooltip="{{ 'action.add' | translate }}"
matTooltipPosition="above">
< mat-icon > add< / mat-icon >
< / button >
< button * ngIf = "!isClientSideTelemetryTypeMap.get(attributeScope)"
mat-button mat-icon-button
< button mat-icon-button
*ngIf="!isClientSideTelemetryTypeMap.get(attributeScope)"
[disabled]="isLoading$ | async"
(click)="reloadAttributes()"
matTooltip="{{ 'action.refresh' | translate }}"
matTooltipPosition="above">
< mat-icon > refresh< / mat-icon >
< / button >
< button mat-button mat- icon-button
< button mat-icon-button
[disabled]="isLoading$ | async"
(click)="enterFilterMode()"
matTooltip="{{ 'action.search' | translate }}"
@ -58,7 +60,7 @@
< / mat-toolbar >
< mat-toolbar class = "mat-table-toolbar" [ fxShow ] = " mode = == ' default ' & & textSearchMode & & dataSource . selection . isEmpty ( ) " >
< div class = "mat-toolbar-tools" >
< button mat-button mat- icon-button
< button mat-icon-button
matTooltip="{{ 'action.search' | translate }}"
matTooltipPosition="above">
< mat-icon > search< / mat-icon >
@ -69,7 +71,7 @@
[(ngModel)]="pageLink.textSearch"
placeholder="{{ 'common.enter-search' | translate }}"/>
< / mat-form-field >
< button mat-button mat- icon-button ( click ) = " exitFilterMode ( ) "
< button mat-icon-button ( click ) = " exitFilterMode ( ) "
matTooltip="{{ 'action.close' | translate }}"
matTooltipPosition="above">
< mat-icon > close< / mat-icon >
@ -77,23 +79,22 @@
< / div >
< / mat-toolbar >
< mat-toolbar class = "mat-table-toolbar" color = "primary" [ fxShow ] = " mode = == ' default ' & & ! dataSource . selection . isEmpty ( ) " >
< div class = "mat-toolbar-tools" >
< span >
{{ translate.get(
attributeScope === latestTelemetryTypes.LATEST_TELEMETRY
? 'attribute.selected-telemetry' : 'attribute.selected-attributes',
{count: dataSource.selection.selected.length}) | async }}
< / span >
< div class = "mat-toolbar-tools" fxLayout . xs = "row wrap" >
< span class = "tb-entity-table-info" >
{{ (attributeScope === latestTelemetryTypes.LATEST_TELEMETRY ?
'attribute.selected-telemetry' : 'attribute.selected-attributes') | translate:{count: dataSource.selection.selected.length} }}
< / span >
< span fxFlex > < / span >
< button [ fxShow ] = " ! isClientSideTelemetryTypeMap . get ( attributeScope ) "
mat-button mat-icon-button [disabled]="isLoading$ | async"
class="button-widget-action"
mat-icon-button [disabled]="isLoading$ | async"
matTooltip="{{ 'action.delete' | translate }}"
matTooltipPosition="above"
(click)="deleteAttributes($event)">
< mat-icon > delete< / mat-icon >
< / button >
< button mat-button mat-raised-button
color="accent "
< button mat-raised-button color = "accent"
class="button-widget-action "
[disabled]="isLoading$ | async"
matTooltip="{{ 'attribute.show-on-widget' | translate }}"
matTooltipPosition="above"
@ -104,7 +105,7 @@
< / div >
< / mat-toolbar >
< mat-toolbar class = "mat-table-toolbar" color = "primary" [ fxShow ] = " mode = == ' widget ' " >
< div class = "mat-toolbar-tools" fxLayoutGap = "8px" >
< div class = "mat-toolbar-tools" fxLayoutGap = "8px" fxLayout . xs = "row wrap" >
< div fxFlex fxLayout = "row" fxLayoutAlign = "start" >
< span class = "tb-details-subtitle" > {{ 'widgets-bundle.current' | translate }}< / span >
< tb-widgets-bundle-select fxFlexOffset = "5"
@ -115,8 +116,9 @@
(ngModelChange)="onWidgetsBundleChanged()">
< / tb-widgets-bundle-select >
< / div >
< button mat-button mat- raised-button [ fxShow ] = " widgetsList . length > 0"
< button mat-raised-button [ fxShow ] = " widgetsList . length > 0"
color="accent"
class="button-widget-action"
[disabled]="isLoading$ | async"
matTooltip="{{ 'attribute.add-to-dashboard' | translate }}"
matTooltipPosition="above"
@ -124,7 +126,7 @@
< mat-icon > dashboard< / mat-icon >
< span translate > attribute.add-to-dashboard< / span >
< / button >
< button mat-button mat- icon-button
< button mat-icon-button
[disabled]="isLoading$ | async"
matTooltip="{{ 'action.close' | translate }}"
matTooltipPosition="above"
@ -134,7 +136,7 @@
< / div >
< / mat-toolbar >
< div fxFlex class = "table-container" [ fxShow ] = " mode ! = = ' widget ' " >
< mat-table [ dataSource ] = " dataSource "
< table mat-table [ dataSource ] = " dataSource "
matSort [matSortActive]="pageLink.sortOrder.property" [matSortDirection]="pageLink.sortDirection()" matSortDisableClear>
< ng-container matColumnDef = "select" sticky >
< mat-header-cell * matHeaderCellDef style = "width: 30px;" >
@ -167,7 +169,7 @@
< mat-cell * matCellDef = "let attribute"
class="tb-value-cell"
(click)="editAttribute($event, attribute)">
< div fxLayout = "row" >
< div fxLayout = "row" style = "align-items: center" >
< span fxFlex > {{attribute.value | tbJson}}< / span >
< span [ fxShow ] = " ! isClientSideTelemetryTypeMap . get ( attributeScope ) " >
< mat-icon > edit< / mat-icon >
@ -179,7 +181,7 @@
< mat-row [ ngClass ] = " { ' mat-row-select ' : true ,
'mat-selected': dataSource.selection.isSelected(attribute)}"
*matRowDef="let attribute; columns: displayedColumns;" (click)="dataSource.selection.toggle(attribute)">< / mat-row >
< / mat- table>
< / table >
< span [ fxShow ] = " dataSource . isEmpty ( ) | async "
fxLayoutAlign="center center"
class="no-data-found" translate>{{
@ -218,14 +220,16 @@
< / section >
< ng-template # carouselPrev >
< button mat-button mat-icon-button * ngIf = "widgetsCarouselIndex > 0"
< button mat-icon-button
*ngIf="widgetsCarouselIndex > 0"
matTooltip="{{ 'attribute.prev-widget' | translate }}"
matTooltipPosition="above">
< mat-icon > keyboard_arrow_left< / mat-icon >
< / button >
< / ng-template >
< ng-template # carouselNext >
< button mat-button mat-icon-button * ngIf = "widgetsCarouselIndex < widgetsList.length - 1"
< button mat-icon-button
*ngIf="widgetsCarouselIndex < widgetsList.length - 1 "
matTooltip="{{ 'attribute.next-widget' | translate }}"
matTooltipPosition="above">
< mat-icon > keyboard_arrow_right< / mat-icon >
@ -241,13 +245,11 @@
< span translate * ngIf = "mode = = = ' widget ' & & widgetsLoaded & &
widgetsList.length === 0 & &
widgetsBundle"
fxLayoutAlign="center center"
fxFlex
fxFlex fxLayoutAlign="center center"
style="text-transform: uppercase; display: flex;"
class="mat-headline">widgets-bundle.empty< / span >
< span translate * ngIf = "mode === 'widget' && !widgetsBundle"
fxLayoutAlign="center center"
fxFlex
fxFlex fxLayoutAlign="center center"
style="text-transform: uppercase; display: flex;"
class="mat-headline">widget.select-widgets-bundle< / span >
< / div >