Merge branch 'master' of https://github.com/thingsboard/thingsboard into UITests
This commit is contained in:
commit
43a3fc7c6e
@ -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()
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user