|
|
|
@ -292,12 +292,16 @@ |
|
|
|
</div> |
|
|
|
</mat-tab> |
|
|
|
<mat-tab label="{{ 'widget-config.settings' | translate }}"> |
|
|
|
<div class="mat-content mat-padding" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<div [formGroup]="widgetSettings" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<span translate>widget-config.general-settings</span> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center"> |
|
|
|
<div fxLayout="column" fxLayoutAlign="center" fxFlex.sm="40%" fxFlex.gt-sm="30%"> |
|
|
|
<mat-form-field fxFlex class="mat-block"> |
|
|
|
<div class="mat-content mat-padding" fxLayout="column"> |
|
|
|
<div [formGroup]="widgetSettings" fxLayout="column"> |
|
|
|
<fieldset class="fields-group" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<legend class="group-title" translate>widget-config.title</legend> |
|
|
|
<mat-slide-toggle formControlName="showTitle"> |
|
|
|
{{ 'widget-config.display-title' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.title</mat-label> |
|
|
|
<input matInput formControlName="title"> |
|
|
|
</mat-form-field> |
|
|
|
@ -306,91 +310,139 @@ |
|
|
|
<input matInput formControlName="titleTooltip"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div fxFlex [fxShow]="widgetSettings.get('showTitle').value"> |
|
|
|
<tb-json-object-edit |
|
|
|
[editorStyle]="{minHeight: '100px'}" |
|
|
|
required |
|
|
|
label="{{ 'widget-config.title-style' | translate }}" |
|
|
|
formControlName="titleStyle" |
|
|
|
></tb-json-object-edit> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div fxLayout="column" fxLayoutAlign="center" fxLayout.gt-md="row" fxLayoutAlign.gt-md="start center" fxFlex="100%" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<mat-checkbox fxFlex formControlName="showTitleIcon"> |
|
|
|
<mat-expansion-panel class="tb-settings"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-description fxLayoutAlign="end" translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<div fxFlex> |
|
|
|
<tb-json-object-edit |
|
|
|
[editorStyle]="{minHeight: '100px'}" |
|
|
|
required |
|
|
|
label="{{ 'widget-config.title-style' | translate }}" |
|
|
|
formControlName="titleStyle" |
|
|
|
></tb-json-object-edit> |
|
|
|
</div> |
|
|
|
</mat-expansion-panel> |
|
|
|
<fieldset class="fields-group" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<legend class="group-title" translate>widget-config.title-icon</legend> |
|
|
|
<mat-slide-toggle formControlName="showTitleIcon"> |
|
|
|
{{ 'widget-config.display-icon' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
<tb-material-icon-select fxFlex |
|
|
|
formControlName="titleIcon"> |
|
|
|
</tb-material-icon-select> |
|
|
|
</div> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.icon-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="iconColor"> |
|
|
|
</tb-color-input> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.icon-size</mat-label> |
|
|
|
<input matInput formControlName="iconSize"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="8px" fxFlex.sm="40%" fxFlex.gt-sm="30%"> |
|
|
|
<mat-checkbox formControlName="showTitle"> |
|
|
|
{{ 'widget-config.display-title' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
<mat-checkbox formControlName="dropShadow"> |
|
|
|
{{ 'widget-config.drop-shadow' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
<mat-checkbox formControlName="enableFullscreen"> |
|
|
|
{{ 'widget-config.enable-fullscreen' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
</div> |
|
|
|
<div fxFlex> |
|
|
|
<tb-json-object-edit |
|
|
|
[editorStyle]="{minHeight: '100px'}" |
|
|
|
required |
|
|
|
label="{{ 'widget-config.widget-style' | translate }}" |
|
|
|
formControlName="widgetStyle" |
|
|
|
></tb-json-object-edit> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div fxLayout="column" fxLayoutAlign="center" fxLayout.gt-md="row" fxLayoutAlign.gt-md="start center" |
|
|
|
fxFlex="100%" fxLayoutGap="8px"> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.background-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="backgroundColor"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.text-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="color"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.padding</mat-label> |
|
|
|
<input matInput formControlName="padding"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.margin</mat-label> |
|
|
|
<input matInput formControlName="margin"> |
|
|
|
</mat-form-field> |
|
|
|
</mat-slide-toggle> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row wrap" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<tb-material-icon-select fxFlex |
|
|
|
formControlName="titleIcon"> |
|
|
|
</tb-material-icon-select> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.icon-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="iconColor"> |
|
|
|
</tb-color-input> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.icon-size</mat-label> |
|
|
|
<input matInput formControlName="iconSize"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<legend class="group-title" translate>widget-config.widget-style</legend> |
|
|
|
<div fxLayout="column" fxLayoutAlign="center" fxLayout.gt-md="row" fxLayoutAlign.gt-md="start center" |
|
|
|
fxFlex="100%" fxLayoutGap="8px"> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.background-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="backgroundColor"> |
|
|
|
</tb-color-input> |
|
|
|
<tb-color-input fxFlex |
|
|
|
label="{{'widget-config.text-color' | translate}}" |
|
|
|
icon="format_color_fill" |
|
|
|
openOnInput |
|
|
|
formControlName="color"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex.gt-md> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.padding</mat-label> |
|
|
|
<input matInput formControlName="padding"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.margin</mat-label> |
|
|
|
<input matInput formControlName="margin"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<mat-slide-toggle formControlName="dropShadow"> |
|
|
|
{{ 'widget-config.drop-shadow' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<mat-slide-toggle formControlName="enableFullscreen"> |
|
|
|
{{ 'widget-config.enable-fullscreen' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
<mat-expansion-panel class="tb-settings"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-description fxLayoutAlign="end" translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<div fxFlex> |
|
|
|
<tb-json-object-edit |
|
|
|
[editorStyle]="{minHeight: '100px'}" |
|
|
|
required |
|
|
|
label="{{ 'widget-config.widget-style' | translate }}" |
|
|
|
formControlName="widgetStyle" |
|
|
|
></tb-json-object-edit> |
|
|
|
</div> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
<fieldset class="fields-group fields-group-slider" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<legend class="group-title" translate>widget-config.legend</legend> |
|
|
|
<mat-expansion-panel class="tb-settings"> |
|
|
|
<mat-expansion-panel-header fxLayout="row wrap"> |
|
|
|
<mat-panel-title> |
|
|
|
<mat-slide-toggle formControlName="showLegend" (click)="$event.stopPropagation()" fxLayoutAlign="center"> |
|
|
|
{{ 'widget-config.display-legend' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</mat-panel-title> |
|
|
|
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<tb-legend-config formControlName="legendConfig"></tb-legend-config> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
<fieldset [formGroup]="layoutSettings" class="fields-group fields-group-slider" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<legend class="group-title" translate>widget-config.mobile-mode-settings</legend> |
|
|
|
<mat-expansion-panel class="tb-settings"> |
|
|
|
<mat-expansion-panel-header> |
|
|
|
<mat-panel-title> |
|
|
|
<mat-slide-toggle formControlName="mobileHide" (click)="$event.stopPropagation()" fxLayoutAlign="center"> |
|
|
|
{{ 'widget-config.mobile-hide' | translate }} |
|
|
|
</mat-slide-toggle> |
|
|
|
</mat-panel-title> |
|
|
|
<mat-panel-description fxLayoutAlign="end center" fxHide.xs translate> |
|
|
|
widget-config.advanced-settings |
|
|
|
</mat-panel-description> |
|
|
|
</mat-expansion-panel-header> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.order</mat-label> |
|
|
|
<input matInput formControlName="mobileOrder" type="number" step="1"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.height</mat-label> |
|
|
|
<input matInput formControlName="mobileHeight" type="number" min="1" max="10" step="1"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</mat-expansion-panel> |
|
|
|
</fieldset> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
@ -402,34 +454,6 @@ |
|
|
|
<input matInput formControlName="decimals" type="number" min="0" max="15" step="1"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div [fxShow]="widgetType === widgetTypes.timeseries || widgetType === widgetTypes.latest" |
|
|
|
fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px" fxFlex="100%"> |
|
|
|
<mat-checkbox fxFlex.gt-xs formControlName="showLegend"> |
|
|
|
{{ 'widget-config.display-legend' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
<section fxFlex.gt-xs fxLayout="row" fxLayoutAlign="start center" style="margin-bottom: 16px;"> |
|
|
|
<tb-legend-config formControlName="legendConfig"> |
|
|
|
</tb-legend-config> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div [formGroup]="layoutSettings" fxLayout="column" fxLayoutGap="8px"> |
|
|
|
<span translate>widget-config.mobile-mode-settings</span> |
|
|
|
<div fxLayout.xs="column" fxLayoutAlign.xs="center" fxLayout="row" fxLayoutAlign="start center" |
|
|
|
fxLayoutGap="8px"> |
|
|
|
<mat-checkbox formControlName="mobileHide"> |
|
|
|
{{ 'widget-config.mobile-hide' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.order</mat-label> |
|
|
|
<input matInput formControlName="mobileOrder" type="number" step="1"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field fxFlex> |
|
|
|
<mat-label translate>widget-config.height</mat-label> |
|
|
|
<input matInput formControlName="mobileHeight" type="number" min="1" max="10" step="1"> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</mat-tab> |
|
|
|
|