Browse Source
Save attributes strategies: fix UI bugs
pull/12764/head
Dmytro Skarzhynets
2 years ago
No known key found for this signature in database
GPG Key ID: 2B51652F224037DF
4 changed files with
10 additions and
10 deletions
-
ui-ngx/src/app/modules/home/components/rule-node/action/advanced-processing-setting.component.html
-
ui-ngx/src/app/modules/home/components/rule-node/action/advanced-processing-setting.component.ts
-
ui-ngx/src/app/modules/home/components/rule-node/action/attributes-config.component.html
-
ui-ngx/src/app/modules/home/components/rule-node/action/attributes-config.model.ts
|
|
|
@ -25,8 +25,8 @@ |
|
|
|
formControlName="timeseries" |
|
|
|
title="{{ 'rule-node-config.save-time-series.time-series' | translate }}" |
|
|
|
></tb-advanced-processing-setting-row> |
|
|
|
<tb-advanced-processing-setting-row *ngIf="attribute" |
|
|
|
formControlName="attribute" |
|
|
|
<tb-advanced-processing-setting-row *ngIf="attributes" |
|
|
|
formControlName="attributes" |
|
|
|
title="{{ 'rule-node-config.save-attribute.attribute' | translate }}" |
|
|
|
></tb-advanced-processing-setting-row> |
|
|
|
<tb-advanced-processing-setting-row *ngIf="latest" |
|
|
|
|
|
|
|
@ -50,7 +50,7 @@ export class AdvancedProcessingSettingComponent implements OnInit, ControlValueA |
|
|
|
|
|
|
|
@Input() |
|
|
|
@coerceBoolean() |
|
|
|
attribute = false; |
|
|
|
attributes = false; |
|
|
|
|
|
|
|
@Input() |
|
|
|
@coerceBoolean() |
|
|
|
@ -77,13 +77,13 @@ export class AdvancedProcessingSettingComponent implements OnInit, ControlValueA |
|
|
|
if (this.timeseries) { |
|
|
|
this.processingForm.addControl('timeseries', this.fb.control(null, [])); |
|
|
|
} |
|
|
|
if (this.attribute) { |
|
|
|
this.processingForm.addControl('attribute', this.fb.control(null, [])); |
|
|
|
if (this.attributes) { |
|
|
|
this.processingForm.addControl('attributes', this.fb.control(null, [])); |
|
|
|
} |
|
|
|
if (this.attribute) { |
|
|
|
if (this.latest) { |
|
|
|
this.processingForm.addControl('latest', this.fb.control(null, [])); |
|
|
|
} |
|
|
|
if (this.attribute) { |
|
|
|
if (this.webSockets) { |
|
|
|
this.processingForm.addControl('webSockets', this.fb.control(null, [])); |
|
|
|
} |
|
|
|
if (this.calculatedFields) { |
|
|
|
|
|
|
|
@ -53,7 +53,7 @@ |
|
|
|
<tb-advanced-processing-settings |
|
|
|
class="mb-4" |
|
|
|
formControlName="advanced" |
|
|
|
attribute webSockets calculatedFields |
|
|
|
attributes webSockets calculatedFields |
|
|
|
></tb-advanced-processing-settings> |
|
|
|
} |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -42,7 +42,7 @@ export interface AttributeDeduplicateProcessingStrategy extends BasicProcessingS |
|
|
|
} |
|
|
|
|
|
|
|
export interface AttributeAdvancedProcessingStrategy extends BasicProcessingSettings { |
|
|
|
attribute: AttributeAdvancedProcessingConfig; |
|
|
|
attributes: AttributeAdvancedProcessingConfig; |
|
|
|
webSockets: AttributeAdvancedProcessingConfig; |
|
|
|
calculatedFields: AttributeAdvancedProcessingConfig; |
|
|
|
} |
|
|
|
@ -54,7 +54,7 @@ export const defaultAdvancedProcessingConfig: AttributeAdvancedProcessingConfig |
|
|
|
} |
|
|
|
|
|
|
|
export const defaultAttributeAdvancedProcessingStrategy: Omit<AttributeAdvancedProcessingStrategy, 'type'> = { |
|
|
|
attribute: defaultAdvancedProcessingConfig, |
|
|
|
attributes: defaultAdvancedProcessingConfig, |
|
|
|
webSockets: defaultAdvancedProcessingConfig, |
|
|
|
calculatedFields: defaultAdvancedProcessingConfig, |
|
|
|
} |
|
|
|
|