diff --git a/application/build.gradle b/application/build.gradle index 1d6017c964..1ea603039a 100644 --- a/application/build.gradle +++ b/application/build.gradle @@ -1,5 +1,5 @@ /** - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/application/pom.xml b/application/pom.xml index 06e2437417..881c35f87d 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -1,6 +1,6 @@ + + + download-dependencies + + true + true + + diff --git a/rule-engine/pom.xml b/rule-engine/pom.xml index 0ceb8ed0d8..8cfefd546a 100644 --- a/rule-engine/pom.xml +++ b/rule-engine/pom.xml @@ -1,6 +1,6 @@ - - \ No newline at end of file + diff --git a/ui/src/app/components/datasource-entity.directive.js b/ui/src/app/components/datasource-entity.directive.js index 9ed05b8812..edc891b2c8 100644 --- a/ui/src/app/components/datasource-entity.directive.js +++ b/ui/src/app/components/datasource-entity.directive.js @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. @@ -124,7 +124,7 @@ function DatasourceEntity($compile, $templateCache, $q, $mdDialog, $window, $doc var alarmDataKeys = []; for (var d in ngModelCtrl.$viewValue.dataKeys) { var dataKey = ngModelCtrl.$viewValue.dataKeys[d]; - if ((dataKey.type === types.dataKeyType.timeseries) || (dataKey.type === types.dataKeyType.attribute)) { + if ((dataKey.type === types.dataKeyType.timeseries) || (dataKey.type === types.dataKeyType.attribute) || (dataKey.type === types.dataKeyType.entityField)) { dataKeys.push(dataKey); } else if (dataKey.type === types.dataKeyType.alarm) { alarmDataKeys.push(dataKey); @@ -219,7 +219,7 @@ function DatasourceEntity($compile, $templateCache, $q, $mdDialog, $window, $doc w.triggerHandler('resize'); } }).then(function (newDataKey) { - if ((newDataKey.type === types.dataKeyType.timeseries) || (newDataKey.type === types.dataKeyType.attribute)) { + if ((newDataKey.type === types.dataKeyType.timeseries) || (newDataKey.type === types.dataKeyType.attribute) || (newDataKey.type === types.dataKeyType.entityField)) { let index = scope.dataKeys.indexOf(dataKey); scope.dataKeys[index] = newDataKey; } else if (newDataKey.type === types.dataKeyType.alarm) { @@ -246,10 +246,16 @@ function DatasourceEntity($compile, $templateCache, $q, $mdDialog, $window, $doc items.push({ name: dataKeys[i], type: types.dataKeyType.timeseries }); } if (scope.widgetType == types.widgetType.latest.value) { - scope.fetchEntityKeys({entityAliasId: scope.entityAlias.id, query: searchText, type: types.dataKeyType.attribute}) - .then(function (dataKeys) { + var keysType = [types.dataKeyType.attribute, types.dataKeyType.entityField]; + var promises = []; + keysType.forEach((type) => { + promises.push(scope.fetchEntityKeys({entityAliasId: scope.entityAlias.id, query: searchText, type: type})); + }); + $q.all(promises).then(function (dataKeys) { for (var i = 0; i < dataKeys.length; i++) { - items.push({ name: dataKeys[i], type: types.dataKeyType.attribute }); + for (var j = 0; j < dataKeys[i].length; j++) { + items.push({name: dataKeys[i][j], type: keysType[i]}); + } } deferred.resolve(items); }, function (e) { diff --git a/ui/src/app/components/datasource-entity.scss b/ui/src/app/components/datasource-entity.scss index 086f6f691f..41465df44d 100644 --- a/ui/src/app/components/datasource-entity.scss +++ b/ui/src/app/components/datasource-entity.scss @@ -1,5 +1,5 @@ /** - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/ui/src/app/components/datasource-entity.tpl.html b/ui/src/app/components/datasource-entity.tpl.html index fe0d23eef7..645e326360 100644 --- a/ui/src/app/components/datasource-entity.tpl.html +++ b/ui/src/app/components/datasource-entity.tpl.html @@ -1,6 +1,6 @@ - + {{model.displayValue}} \ No newline at end of file diff --git a/ui/src/app/components/timewindow-panel.controller.js b/ui/src/app/components/timewindow-panel.controller.js index 092d2a9b4e..eb854d9fbc 100644 --- a/ui/src/app/components/timewindow-panel.controller.js +++ b/ui/src/app/components/timewindow-panel.controller.js @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/ui/src/app/components/timewindow-panel.tpl.html b/ui/src/app/components/timewindow-panel.tpl.html index 98608c994a..46a1f002c1 100644 --- a/ui/src/app/components/timewindow-panel.tpl.html +++ b/ui/src/app/components/timewindow-panel.tpl.html @@ -1,6 +1,6 @@
- + {{ 'timewindow.edit' | translate }} @@ -28,7 +28,7 @@ {{model.displayValue}} - + {{ 'timewindow.edit' | translate }} diff --git a/ui/src/app/components/truncate.filter.js b/ui/src/app/components/truncate.filter.js index 809ec692de..de32bbcd2a 100644 --- a/ui/src/app/components/truncate.filter.js +++ b/ui/src/app/components/truncate.filter.js @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/ui/src/app/components/widget/action/custom-action-pretty-editor.directive.js b/ui/src/app/components/widget/action/custom-action-pretty-editor.directive.js index 0d282af05e..65150d44ce 100644 --- a/ui/src/app/components/widget/action/custom-action-pretty-editor.directive.js +++ b/ui/src/app/components/widget/action/custom-action-pretty-editor.directive.js @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/ui/src/app/components/widget/action/custom-action-pretty-editor.scss b/ui/src/app/components/widget/action/custom-action-pretty-editor.scss index b32f75cd06..fa6319b44a 100644 --- a/ui/src/app/components/widget/action/custom-action-pretty-editor.scss +++ b/ui/src/app/components/widget/action/custom-action-pretty-editor.scss @@ -1,5 +1,5 @@ /** - * Copyright © 2016-2019 The Thingsboard Authors + * Copyright © 2016-2020 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. diff --git a/ui/src/app/components/widget/action/custom-action-pretty-editor.tpl.html b/ui/src/app/components/widget/action/custom-action-pretty-editor.tpl.html index 80cdf2a786..79b0dd625c 100644 --- a/ui/src/app/components/widget/action/custom-action-pretty-editor.tpl.html +++ b/ui/src/app/components/widget/action/custom-action-pretty-editor.tpl.html @@ -1,6 +1,6 @@