Browse Source

UI: Flot line chart data key settings

pull/8881/head
Igor Kulikov 3 years ago
parent
commit
48e781fe2a
  1. 1
      ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.html
  2. 1
      ui-ngx/src/app/modules/home/components/dashboard-page/edit-widget.component.html
  3. 44
      ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-key-settings.component.html
  4. 18
      ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-threshold.component.html
  5. 10
      ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-threshold.component.scss
  6. 50
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/value-source.component.html
  7. 14
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/value-source.component.ts
  8. 1
      ui-ngx/src/app/modules/home/components/widget/widget-preview.component.html
  9. 4
      ui-ngx/src/app/modules/home/components/widget/widget-preview.component.ts
  10. 6
      ui-ngx/src/app/shared/components/color-input.component.html
  11. 3
      ui-ngx/src/app/shared/components/color-input.component.ts
  12. 24
      ui-ngx/src/app/shared/components/toggle-select.component.html
  13. 132
      ui-ngx/src/app/shared/components/toggle-select.component.ts
  14. 5
      ui-ngx/src/app/shared/shared.module.ts
  15. 3
      ui-ngx/src/assets/locale/locale.constant-en_US.json
  16. 12
      ui-ngx/src/styles.scss

1
ui-ngx/src/app/modules/home/components/dashboard-page/add-widget-dialog.component.html

@ -57,6 +57,7 @@
<tb-widget-preview *ngIf="previewMode" class="tb-absolute-fill" <tb-widget-preview *ngIf="previewMode" class="tb-absolute-fill"
[aliasController]="aliasController" [aliasController]="aliasController"
[stateController]="stateController" [stateController]="stateController"
[dashboardTimewindow]="dashboard.configuration.timewindow"
[widget]="widget" [widget]="widget"
[widgetConfig]="widgetFormGroup.get('widgetConfig').value.config"> [widgetConfig]="widgetFormGroup.get('widgetConfig').value.config">
<div class="tb-preview-panel-content"> <div class="tb-preview-panel-content">

1
ui-ngx/src/app/modules/home/components/dashboard-page/edit-widget.component.html

@ -58,6 +58,7 @@
<tb-widget-preview class="widget-preview-section" <tb-widget-preview class="widget-preview-section"
[aliasController]="aliasController" [aliasController]="aliasController"
[stateController]="stateController" [stateController]="stateController"
[dashboardTimewindow]="dashboard.configuration.timewindow"
[widget]="widget" [widget]="widget"
[widgetConfig]="widgetFormGroup.get('widgetConfig').value.config"> [widgetConfig]="widgetFormGroup.get('widgetConfig').value.config">
</tb-widget-preview> </tb-widget-preview>

44
ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-key-settings.component.html

@ -216,35 +216,35 @@
</div> </div>
</div> </div>
</div> </div>
</ng-container> <div class="tb-widget-config-panel tb-slide-toggle" formGroupName="comparisonSettings">
<section class="tb-widget-settings" [formGroup]="flotKeySettingsFormGroup" fxLayout="column"> <div class="tb-widget-config-panel-title" translate>widgets.chart.comparison-settings</div>
<fieldset class="fields-group fields-group-slider" formGroupName="comparisonSettings" > <mat-expansion-panel class="tb-settings" [expanded]="flotKeySettingsFormGroup.get('comparisonSettings.showValuesForComparison').value"
<legend class="group-title" translate>widgets.chart.comparison-settings</legend> [disabled]="!flotKeySettingsFormGroup.get('comparisonSettings.showValuesForComparison').value">
<mat-expansion-panel class="tb-settings" [expanded]="flotKeySettingsFormGroup.get('comparisonSettings.showValuesForComparison').value">
<mat-expansion-panel-header fxLayout="row wrap"> <mat-expansion-panel-header fxLayout="row wrap">
<mat-panel-title fxFlex="60"> <mat-panel-title>
<mat-slide-toggle formControlName="showValuesForComparison" (click)="$event.stopPropagation()" <mat-slide-toggle class="mat-slide" formControlName="showValuesForComparison" (click)="$event.stopPropagation()"
fxLayoutAlign="center"> fxLayoutAlign="center">
{{ 'widgets.chart.show-values-for-comparison' | translate }} {{ 'widgets.chart.show-values-for-comparison' | translate }}
</mat-slide-toggle> </mat-slide-toggle>
</mat-panel-title> </mat-panel-title>
<mat-panel-description fxFlex="40" fxLayoutAlign="end center" fxHide.xs translate>
widget-config.advanced-settings
</mat-panel-description>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent> <ng-template matExpansionPanelContent>
<section fxFlex fxLayout="column" fxLayout.gt-xs="row" fxLayoutGap.gt-xs="8px"> <div class="tb-widget-config-row">
<mat-form-field fxFlex class="mat-block"> <div class="fixed-title-width" translate>widgets.chart.comparison-values-label</div>
<mat-label translate>widgets.chart.comparison-values-label</mat-label> <mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic">
<input matInput formControlName="comparisonValuesLabel"> <input matInput formControlName="comparisonValuesLabel" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field> </mat-form-field>
<tb-color-input fxFlex </div>
formControlName="color" <div class="tb-widget-config-row space-between same-padding">
icon="format_color_fill" <div>{{ 'widgets.chart.comparison-line-color' | translate }}</div>
label="{{ 'widgets.chart.color' | translate }}" openOnInput colorClearButton> <div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="16px">
</tb-color-input> <mat-divider vertical></mat-divider>
</section> <tb-color-input asBoxInput
formControlName="color">
</tb-color-input>
</div>
</div>
</ng-template> </ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</fieldset> </div>
</section> </ng-container>

18
ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-threshold.component.html

@ -16,7 +16,7 @@
--> -->
<div class="tb-flot-threshold"> <div class="tb-flot-threshold">
<mat-expansion-panel class="tb-settings" fxFlex [formGroup]="thresholdFormGroup" [(expanded)]="expanded"> <mat-expansion-panel class="tb-settings tb-flot-threshold-settings" fxFlex [formGroup]="thresholdFormGroup" [(expanded)]="expanded">
<mat-expansion-panel-header class="fill-width"> <mat-expansion-panel-header class="fill-width">
<div class="tb-threshold-header"> <div class="tb-threshold-header">
<div class="tb-threshold-text">{{ thresholdText() }}</div> <div class="tb-threshold-text">{{ thresholdText() }}</div>
@ -29,17 +29,13 @@
</mat-expansion-panel-header> </mat-expansion-panel-header>
<ng-template matExpansionPanelContent> <ng-template matExpansionPanelContent>
<tb-value-source [aliasController]="aliasController" formControlName="valueSource"></tb-value-source> <tb-value-source [aliasController]="aliasController" formControlName="valueSource"></tb-value-source>
<section fxLayout="column" fxLayout.gt-xs="row" fxLayoutGap.gt-xs="8px"> <div class="tb-widget-config-row space-between">
<mat-form-field fxFlex class="mat-block"> <div translate>widgets.chart.line-width</div>
<mat-label translate>widgets.chart.line-width</mat-label> <mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
<input type="number" min="0" matInput formControlName="lineWidth"> <input matInput formControlName="lineWidth" type="number" min="0" placeholder="{{ 'widget-config.set' | translate }}">
<span matSuffix>px</span>
</mat-form-field> </mat-form-field>
<tb-color-input fxFlex </div>
formControlName="color"
icon="format_color_fill"
label="{{ 'widgets.chart.color' | translate }}" openOnInput colorClearButton>
</tb-color-input>
</section>
</ng-template> </ng-template>
</mat-expansion-panel> </mat-expansion-panel>
<button *ngIf="!disabled" mat-icon-button <button *ngIf="!disabled" mat-icon-button

10
ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/flot-threshold.component.scss

@ -19,7 +19,7 @@
flex-direction: row; flex-direction: row;
align-items: start; align-items: start;
gap: 4px; gap: 4px;
.mat-expansion-panel { .mat-expansion-panel.tb-settings.tb-flot-threshold-settings {
box-shadow: none; box-shadow: none;
border-radius: 6px; border-radius: 6px;
border: 1px solid rgba(0, 0, 0, 0.12); border: 1px solid rgba(0, 0, 0, 0.12);
@ -54,8 +54,10 @@
margin-top: 12px; margin-top: 12px;
} }
} }
.mat-expansion-panel-body { > .mat-expansion-panel-content {
padding: 0 8px 8px; > .mat-expansion-panel-body {
padding: 16px !important;
}
} }
&.mat-expanded { &.mat-expanded {
.mat-expansion-panel-header { .mat-expansion-panel-header {
@ -63,7 +65,7 @@
} }
} }
} }
.mdc-icon-button { > .mdc-icon-button {
margin-top: 4px; margin-top: 4px;
color: rgba(0, 0, 0, 0.54); color: rgba(0, 0, 0, 0.54);
} }

50
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/value-source.component.html

@ -15,27 +15,27 @@
limitations under the License. limitations under the License.
--> -->
<section [formGroup]="valueSourceFormGroup" fxLayout="column"> <ng-container [formGroup]="valueSourceFormGroup">
<mat-form-field fxFlex class="mat-block"> <div style="display: flex;">
<mat-label translate>widgets.value-source.value-source</mat-label> <tb-toggle-select formControlName="valueSource" style="min-width: 300px;">
<mat-select formControlName="valueSource"> <tb-toggle-option [value]="'predefinedValue'">
<mat-option [value]="'predefinedValue'">
{{ 'widgets.value-source.predefined-value' | translate }} {{ 'widgets.value-source.predefined-value' | translate }}
</mat-option> </tb-toggle-option>
<mat-option [value]="'entityAttribute'"> <tb-toggle-option [value]="'entityAttribute'">
{{ 'widgets.value-source.entity-attribute' | translate }} {{ 'widgets.value-source.entity-attribute' | translate }}
</mat-option> </tb-toggle-option>
</mat-select> </tb-toggle-select>
</mat-form-field> </div>
<mat-form-field [fxShow]="valueSourceFormGroup.get('valueSource').value === 'predefinedValue'" fxFlex class="mat-block"> <div [fxShow]="valueSourceFormGroup.get('valueSource').value === 'predefinedValue'" class="tb-widget-config-row space-between">
<mat-label translate>widgets.value-source.value</mat-label> <div translate>widgets.value-source.value</div>
<input matInput type="number" formControlName="value"> <mat-form-field appearance="outline" class="number" subscriptSizing="dynamic">
</mat-form-field> <input matInput formControlName="value" type="number" placeholder="{{ 'widget-config.set' | translate }}">
<section [fxShow]="valueSourceFormGroup.get('valueSource').value === 'entityAttribute'" </mat-form-field>
fxLayout="row" fxLayout.xs="column" fxLayoutGap="8px" fxLayoutAlign="start center"> </div>
<mat-form-field fxFlex class="mat-block"> <div [fxShow]="valueSourceFormGroup.get('valueSource').value === 'entityAttribute'" class="tb-widget-config-row space-between">
<mat-label>{{ 'widgets.value-source.source-entity-alias' | translate }}</mat-label> <div translate>widgets.value-source.source-entity-alias</div>
<input matInput type="text" placeholder="{{ 'entity.entity-alias' | translate }}" <mat-form-field class="medium-width" appearance="outline" subscriptSizing="dynamic">
<input matInput type="text" placeholder="{{ 'widget-config.set' | translate }}"
#entityAliasInput #entityAliasInput
formControlName="entityAlias" formControlName="entityAlias"
[matAutocomplete]="entityAliasAutocomplete"> [matAutocomplete]="entityAliasAutocomplete">
@ -53,9 +53,11 @@
</mat-option> </mat-option>
</mat-autocomplete> </mat-autocomplete>
</mat-form-field> </mat-form-field>
<mat-form-field fxFlex class="mat-block"> </div>
<mat-label>{{ 'widgets.value-source.source-entity-attribute' | translate }}</mat-label> <div [fxShow]="valueSourceFormGroup.get('valueSource').value === 'entityAttribute'" class="tb-widget-config-row space-between">
<input matInput type="text" placeholder="{{ 'entity.key-name' | translate }}" <div translate>widgets.value-source.source-entity-attribute</div>
<mat-form-field class="medium-width" appearance="outline" subscriptSizing="dynamic">
<input matInput type="text" placeholder="{{ 'widget-config.set' | translate }}"
#keyInput #keyInput
formControlName="attribute" formControlName="attribute"
[matAutocomplete]="keyAutocomplete"> [matAutocomplete]="keyAutocomplete">
@ -73,5 +75,5 @@
</mat-option> </mat-option>
</mat-autocomplete> </mat-autocomplete>
</mat-form-field> </mat-form-field>
</section> </div>
</section> </ng-container>

14
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/value-source.component.ts

@ -14,8 +14,8 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Component, ElementRef, forwardRef, HostBinding, Input, OnInit, ViewChild } from '@angular/core'; import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@angular/core';
import { ControlValueAccessor, UntypedFormBuilder, UntypedFormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms'; import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { PageComponent } from '@shared/components/page.component'; import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
@ -39,7 +39,7 @@ export interface ValueSourceProperty {
@Component({ @Component({
selector: 'tb-value-source', selector: 'tb-value-source',
templateUrl: './value-source.component.html', templateUrl: './value-source.component.html',
styleUrls: [], styleUrls: ['./../widget-settings.scss'],
providers: [ providers: [
{ {
provide: NG_VALUE_ACCESSOR, provide: NG_VALUE_ACCESSOR,
@ -50,8 +50,6 @@ export interface ValueSourceProperty {
}) })
export class ValueSourceComponent extends PageComponent implements OnInit, ControlValueAccessor { export class ValueSourceComponent extends PageComponent implements OnInit, ControlValueAccessor {
@HostBinding('style.display') display = 'block';
@ViewChild('entityAliasInput') entityAliasInput: ElementRef; @ViewChild('entityAliasInput') entityAliasInput: ElementRef;
@ViewChild('keyInput') keyInput: ElementRef; @ViewChild('keyInput') keyInput: ElementRef;
@ -212,15 +210,13 @@ export class ValueSourceComponent extends PageComponent implements OnInit, Contr
private fetchEntityKeys(entityAliasId: string, dataKeyTypes: Array<DataKeyType>): Observable<Array<DataKey>> { private fetchEntityKeys(entityAliasId: string, dataKeyTypes: Array<DataKeyType>): Observable<Array<DataKey>> {
return this.aliasController.getAliasInfo(entityAliasId).pipe( return this.aliasController.getAliasInfo(entityAliasId).pipe(
mergeMap((aliasInfo) => { mergeMap((aliasInfo) => this.entityService.getEntityKeysByEntityFilter(
return this.entityService.getEntityKeysByEntityFilter(
aliasInfo.entityFilter, aliasInfo.entityFilter,
dataKeyTypes, [], dataKeyTypes, [],
{ignoreLoading: true, ignoreErrors: true} {ignoreLoading: true, ignoreErrors: true}
).pipe( ).pipe(
catchError(() => of([])) catchError(() => of([]))
); )),
}),
catchError(() => of([] as Array<DataKey>)) catchError(() => of([] as Array<DataKey>))
); );
} }

1
ui-ngx/src/app/modules/home/components/widget/widget-preview.component.html

@ -18,6 +18,7 @@
<tb-dashboard class="tb-preview-dashboard" <tb-dashboard class="tb-preview-dashboard"
[aliasController]="aliasController" [aliasController]="aliasController"
[stateController]="stateController" [stateController]="stateController"
[dashboardTimewindow]="dashboardTimewindow"
[widgets]="widgets" [widgets]="widgets"
[autofillHeight]="true" [autofillHeight]="true"
[columns]="24" [columns]="24"

4
ui-ngx/src/app/modules/home/components/widget/widget-preview.component.ts

@ -21,6 +21,7 @@ import { Widget, WidgetConfig } from '@shared/models/widget.models';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state'; import { AppState } from '@core/core.state';
import { deepClone } from '@core/utils'; import { deepClone } from '@core/utils';
import { Timewindow } from '@shared/models/time/time.models';
@Component({ @Component({
selector: 'tb-widget-preview', selector: 'tb-widget-preview',
@ -35,6 +36,9 @@ export class WidgetPreviewComponent extends PageComponent implements OnInit, OnC
@Input() @Input()
stateController: IStateController; stateController: IStateController;
@Input()
dashboardTimewindow: Timewindow;
@Input() @Input()
widget: Widget; widget: Widget;

6
ui-ngx/src/app/shared/components/color-input.component.html

@ -20,10 +20,10 @@
<mat-icon *ngIf="icon">{{icon}}</mat-icon> <mat-icon *ngIf="icon">{{icon}}</mat-icon>
<span *ngIf="label">{{label}}</span> <span *ngIf="label">{{label}}</span>
</mat-label> </mat-label>
<div matPrefix class="tb-color-preview" (click)="!disabled && showColorPicker()"> <div matPrefix class="tb-color-preview" (click)="!disabled && showColorPicker($event)">
<div class="tb-color-result" [ngStyle]="{background: colorFormGroup.get('color').value}"></div> <div class="tb-color-result" [ngStyle]="{background: colorFormGroup.get('color').value}"></div>
</div> </div>
<input matInput formControlName="color" (keydown)="$event.preventDefault();" (click)="openOnInput && showColorPicker()" [required]="required"> <input matInput formControlName="color" (keydown)="$event.preventDefault();" (click)="openOnInput && showColorPicker($event)" [required]="required">
<button *ngIf="colorClearButton && !disabled" <button *ngIf="colorClearButton && !disabled"
type="button" type="button"
matSuffix mat-icon-button aria-label="Clear" matSuffix mat-icon-button aria-label="Clear"
@ -35,7 +35,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<ng-template #boxInput> <ng-template #boxInput>
<div class="tb-color-preview no-margin box" [ngClass]="{'disabled': disabled}" (click)="!disabled && showColorPicker()"> <div class="tb-color-preview no-margin box" [ngClass]="{'disabled': disabled}" (click)="!disabled && showColorPicker($event)">
<div class="tb-color-result" [ngStyle]="!disabled ? {background: colorFormGroup.get('color').value} : {}"></div> <div class="tb-color-result" [ngStyle]="!disabled ? {background: colorFormGroup.get('color').value} : {}"></div>
</div> </div>
</ng-template> </ng-template>

3
ui-ngx/src/app/shared/components/color-input.component.ts

@ -153,7 +153,8 @@ export class ColorInputComponent extends PageComponent implements OnInit, Contro
} }
} }
showColorPicker() { showColorPicker($event: MouseEvent) {
$event.stopPropagation();
this.dialogs.colorPicker(this.colorFormGroup.get('color').value).subscribe( this.dialogs.colorPicker(this.colorFormGroup.get('color').value).subscribe(
(color) => { (color) => {
if (color) { if (color) {

24
ui-ngx/src/app/shared/components/toggle-select.component.html

@ -0,0 +1,24 @@
<!--
Copyright © 2016-2023 The Thingsboard Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tb-toggle-header
ignoreMdLgSize="true"
useSelectOnMdLg="false"
[options]="options"
[value]="modelValue"
(valueChange)="updateModel($event)">
</tb-toggle-header>

132
ui-ngx/src/app/shared/components/toggle-select.component.ts

@ -0,0 +1,132 @@
///
/// Copyright © 2016-2023 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import {
AfterContentInit,
ChangeDetectorRef,
Component,
ContentChildren,
Directive,
ElementRef,
forwardRef,
Input,
OnDestroy,
QueryList
} from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { Subject } from 'rxjs';
import { startWith, takeUntil } from 'rxjs/operators';
import { ToggleHeaderOption } from '@shared/components/toggle-header.component';
@Directive(
{
// eslint-disable-next-line @angular-eslint/directive-selector
selector: 'tb-toggle-option',
}
)
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class ToggleSelectOption {
@Input() value: any;
get viewValue(): string {
return (this._element?.nativeElement.textContent || '').trim();
}
constructor(
private _element: ElementRef<HTMLElement>
) {}
}
@Component({
selector: 'tb-toggle-select',
templateUrl: './toggle-select.component.html',
styleUrls: [],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => ToggleSelectComponent),
multi: true
}
]
})
export class ToggleSelectComponent extends PageComponent implements AfterContentInit, OnDestroy, ControlValueAccessor {
@ContentChildren(ToggleSelectOption) toggleSelectOptions: QueryList<ToggleSelectOption>;
@Input()
disabled: boolean;
options: ToggleHeaderOption[] = [];
private _destroyed = new Subject<void>();
modelValue: any;
private propagateChange = null;
constructor(protected store: Store<AppState>,
private cd: ChangeDetectorRef) {
super(store);
}
ngAfterContentInit(): void {
this.toggleSelectOptions.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {
this.syncToggleHeaderOptions();
});
}
ngOnDestroy() {
this._destroyed.next();
this._destroyed.complete();
}
registerOnChange(fn: any): void {
this.propagateChange = fn;
}
registerOnTouched(fn: any): void {
}
setDisabledState(isDisabled: boolean): void {
this.disabled = isDisabled;
}
writeValue(value: any): void {
this.modelValue = value;
}
private syncToggleHeaderOptions() {
this.options.length = 0;
if (this.toggleSelectOptions) {
this.toggleSelectOptions.forEach(selectOption => {
this.options.push(
{ name: selectOption.viewValue,
value: selectOption.value
}
);
});
}
}
updateModel(value: any) {
this.modelValue = value;
this.propagateChange(this.modelValue);
}
}

5
ui-ngx/src/app/shared/shared.module.ts

@ -193,6 +193,7 @@ import { ResourceAutocompleteComponent } from '@shared/components/resource/resou
import { ShortNumberPipe } from '@shared/pipe/short-number.pipe'; import { ShortNumberPipe } from '@shared/pipe/short-number.pipe';
import { ToggleHeaderComponent } from '@shared/components/toggle-header.component'; import { ToggleHeaderComponent } from '@shared/components/toggle-header.component';
import { RuleChainSelectComponent } from '@shared/components/rule-chain/rule-chain-select.component'; import { RuleChainSelectComponent } from '@shared/components/rule-chain/rule-chain-select.component';
import { ToggleSelectComponent, ToggleSelectOption } from '@shared/components/toggle-select.component';
export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) { export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService) {
return markedOptionsService; return markedOptionsService;
@ -364,6 +365,8 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
ColorPickerComponent, ColorPickerComponent,
ResourceAutocompleteComponent, ResourceAutocompleteComponent,
ToggleHeaderComponent, ToggleHeaderComponent,
ToggleSelectOption,
ToggleSelectComponent,
RuleChainSelectComponent RuleChainSelectComponent
], ],
imports: [ imports: [
@ -592,6 +595,8 @@ export function MarkedOptionsFactory(markedOptionsService: MarkedOptionsService)
ColorPickerComponent, ColorPickerComponent,
ResourceAutocompleteComponent, ResourceAutocompleteComponent,
ToggleHeaderComponent, ToggleHeaderComponent,
ToggleSelectOption,
ToggleSelectComponent,
RuleChainSelectComponent RuleChainSelectComponent
] ]
}) })

3
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -4365,6 +4365,7 @@
"add-threshold": "Add threshold", "add-threshold": "Add threshold",
"show-values-for-comparison": "Show historical values for comparison", "show-values-for-comparison": "Show historical values for comparison",
"comparison-values-label": "Historical values label", "comparison-values-label": "Historical values label",
"comparison-line-color": "Comparison line color",
"threshold-settings": "Threshold settings", "threshold-settings": "Threshold settings",
"use-as-threshold": "Use key value as threshold", "use-as-threshold": "Use key value as threshold",
"threshold-line-width": "Threshold line width", "threshold-line-width": "Threshold line width",
@ -5277,7 +5278,7 @@
"value-source": { "value-source": {
"value-source": "Value source", "value-source": "Value source",
"predefined-value": "Predefined value", "predefined-value": "Predefined value",
"entity-attribute": "Value taken from entity attribute", "entity-attribute": "Entity attribute",
"value": "Value", "value": "Value",
"source-entity-alias": "Source entity alias", "source-entity-alias": "Source entity alias",
"source-entity-attribute": "Source entity attribute" "source-entity-attribute": "Source entity attribute"

12
ui-ngx/src/styles.scss

@ -1360,6 +1360,18 @@ mat-label {
line-height: 20px; line-height: 20px;
} }
} }
.mat-mdc-form-field-icon-suffix {
button.mat-mdc-icon-button {
width: 40px;
height: 40px;
padding: 8px;
.mat-icon {
width: 20px;
height: 20px;
font-size: 20px;
}
}
}
} }
} }
&.center { &.center {

Loading…
Cancel
Save