Merge remote-tracking branch 'upstream/master' into alarmComments

This commit is contained in:
dashevchenko 2022-12-22 15:08:33 +02:00
commit dd55d8c9d2
4 changed files with 10 additions and 4 deletions

View File

@ -148,7 +148,7 @@ ui:
# Help parameters # Help parameters
help: help:
# Base url for UI help assets # Base url for UI help assets
base-url: "${UI_HELP_BASE_URL:https://raw.githubusercontent.com/thingsboard/thingsboard-ui-help/release-3.4.2}" base-url: "${UI_HELP_BASE_URL:https://raw.githubusercontent.com/thingsboard/thingsboard-ui-help/release-3.4.3}"
database: database:
ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by single API call to fetch telemetry records

View File

@ -53,8 +53,13 @@ public class ConstraintValidator {
public static List<String> getConstraintsViolations(Object data) { public static List<String> getConstraintsViolations(Object data) {
return fieldsValidator.validate(data).stream() return fieldsValidator.validate(data).stream()
.map(constraintViolation -> { .map(constraintViolation -> {
Path propertyPath = constraintViolation.getPropertyPath(); String property;
String property = Iterators.getLast(propertyPath.iterator()).toString(); if (constraintViolation.getConstraintDescriptor().getAttributes().containsKey("fieldName")) {
property = constraintViolation.getConstraintDescriptor().getAttributes().get("fieldName").toString();
} else {
Path propertyPath = constraintViolation.getPropertyPath();
property = Iterators.getLast(propertyPath.iterator()).toString();
}
return property + " " + constraintViolation.getMessage(); return property + " " + constraintViolation.getMessage();
}) })
.distinct() .distinct()

View File

@ -38,7 +38,7 @@
<tb-postgres.docker.name>tb-postgres</tb-postgres.docker.name> <tb-postgres.docker.name>tb-postgres</tb-postgres.docker.name>
<tb-cassandra.docker.name>tb-cassandra</tb-cassandra.docker.name> <tb-cassandra.docker.name>tb-cassandra</tb-cassandra.docker.name>
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder> <pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
<pkg.upgradeVersion>3.4.2</pkg.upgradeVersion> <pkg.upgradeVersion>3.4.3</pkg.upgradeVersion>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -204,6 +204,7 @@ export class WidgetSubscription implements IWidgetSubscription {
this.timeWindow = {}; this.timeWindow = {};
this.useDashboardTimewindow = options.useDashboardTimewindow; this.useDashboardTimewindow = options.useDashboardTimewindow;
this.useTimewindow = true; this.useTimewindow = true;
this.onTimewindowChangeFunction = options.onTimewindowChangeFunction || ((timewindow) => timewindow);
if (this.useDashboardTimewindow) { if (this.useDashboardTimewindow) {
this.timeWindowConfig = deepClone(options.dashboardTimewindow); this.timeWindowConfig = deepClone(options.dashboardTimewindow);
} else { } else {