Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Added 'Update latest on value change' for save timeseries rule node #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
{{ 'tb.rulenode.use-server-ts' | translate }}
</mat-checkbox>
<div class="tb-hint" translate>tb.rulenode.use-server-ts-hint</div>
<mat-checkbox fxFlex formControlName="updateLatestOnValueChange">
{{ 'tb.rulenode.update-latest-on-value-change' | translate }}
</mat-checkbox>
<div class="tb-hint" translate>tb.rulenode.update-latest-on-value-change-hint</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export class TimeseriesConfigComponent extends RuleNodeConfigurationComponent {
this.timeseriesConfigForm = this.fb.group({
defaultTTL: [configuration ? configuration.defaultTTL : null, [Validators.required, Validators.min(0)]],
skipLatestPersistence: [configuration ? configuration.skipLatestPersistence : false, []],
useServerTs: [configuration ? configuration.useServerTs : false, []]
useServerTs: [configuration ? configuration.useServerTs : false, []],
updateLatestOnValueChange: [configuration ? configuration.updateLatestOnValueChange : false, []]
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ export default function addRuleNodeCoreLocaleEnglish(translate: TranslateService
'skip-latest-persistence': 'Skip latest persistence',
'use-server-ts': 'Use server ts',
'use-server-ts-hint': 'Enable this setting to use the timestamp of the message processing instead of the timestamp from the message. Useful for all sorts of sequential processing if you merge messages from multiple sources (devices, assets, etc).',
'update-latest-on-value-change': 'Update latest on value change',
'update-latest-on-value-change-hint': 'Only update the latest value if it differs from the previous one. This configuration affects only latest and has no impact on historical timeseries.',
'kv-map-pattern-hint': 'All input fields support templatization. Use $[messageKey] to extract value from the message body and ${metadataKey} to extract value from the message metadata.',
'shared-scope': 'Shared scope',
'server-scope': 'Server scope',
Expand Down