Merge branch 'master' of github.com:thingsboard/thingsboard
This commit is contained in:
commit
99afad3f6f
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>application</artifactId>
|
<artifactId>application</artifactId>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -214,6 +214,8 @@ public class ThingsboardInstallService {
|
|||||||
log.info("Upgrading ThingsBoard from version 3.3.2 to 3.3.3 ...");
|
log.info("Upgrading ThingsBoard from version 3.3.2 to 3.3.3 ...");
|
||||||
databaseEntitiesUpgradeService.upgradeDatabase("3.3.2");
|
databaseEntitiesUpgradeService.upgradeDatabase("3.3.2");
|
||||||
dataUpdateService.updateData("3.3.2");
|
dataUpdateService.updateData("3.3.2");
|
||||||
|
case "3.3.3":
|
||||||
|
log.info("Upgrading ThingsBoard from version 3.3.3 to 3.3.4 ...");
|
||||||
log.info("Updating system data...");
|
log.info("Updating system data...");
|
||||||
systemDataLoaderService.updateSystemWidgets();
|
systemDataLoaderService.updateSystemWidgets();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
2
common/cache/pom.xml
vendored
2
common/cache/pom.xml
vendored
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common.transport</groupId>
|
<groupId>org.thingsboard.common.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common.transport</groupId>
|
<groupId>org.thingsboard.common.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common.transport</groupId>
|
<groupId>org.thingsboard.common.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common.transport</groupId>
|
<groupId>org.thingsboard.common.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common.transport</groupId>
|
<groupId>org.thingsboard.common.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>common</artifactId>
|
<artifactId>common</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.common</groupId>
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thingsboard-js-executor",
|
"name": "thingsboard-js-executor",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "3.3.3",
|
"version": "3.3.4",
|
||||||
"description": "ThingsBoard JavaScript Executor Microservice",
|
"description": "ThingsBoard JavaScript Executor Microservice",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"bin": "server.js",
|
"bin": "server.js",
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa.transport</groupId>
|
<groupId>org.thingsboard.msa.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa.transport</groupId>
|
<groupId>org.thingsboard.msa.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa.transport</groupId>
|
<groupId>org.thingsboard.msa.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa.transport</groupId>
|
<groupId>org.thingsboard.msa.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.thingsboard.msa.transport</groupId>
|
<groupId>org.thingsboard.msa.transport</groupId>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thingsboard-web-ui",
|
"name": "thingsboard-web-ui",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "3.3.3",
|
"version": "3.3.4",
|
||||||
"description": "ThingsBoard Web UI Microservice",
|
"description": "ThingsBoard Web UI Microservice",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"bin": "server.js",
|
"bin": "server.js",
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>msa</artifactId>
|
<artifactId>msa</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.msa</groupId>
|
<groupId>org.thingsboard.msa</groupId>
|
||||||
|
|||||||
@ -19,11 +19,11 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>netty-mqtt</artifactId>
|
<artifactId>netty-mqtt</artifactId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Netty MQTT Client</name>
|
<name>Netty MQTT Client</name>
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>Thingsboard</name>
|
<name>Thingsboard</name>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>rest-client</artifactId>
|
<artifactId>rest-client</artifactId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>rule-engine</artifactId>
|
<artifactId>rule-engine</artifactId>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>rule-engine</artifactId>
|
<artifactId>rule-engine</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.rule-engine</groupId>
|
<groupId>org.thingsboard.rule-engine</groupId>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>rule-engine</artifactId>
|
<artifactId>rule-engine</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.rule-engine</groupId>
|
<groupId>org.thingsboard.rule-engine</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>tools</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.transport</groupId>
|
<groupId>org.thingsboard.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.transport</groupId>
|
<groupId>org.thingsboard.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.transport</groupId>
|
<groupId>org.thingsboard.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard.transport</groupId>
|
<groupId>org.thingsboard.transport</groupId>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>transport</artifactId>
|
<artifactId>transport</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "thingsboard",
|
"name": "thingsboard",
|
||||||
"version": "3.3.3",
|
"version": "3.3.4",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open",
|
"start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open",
|
||||||
|
|||||||
21
ui-ngx/patches/@geoman-io+leaflet-geoman-free+2.11.4.patch
Normal file
21
ui-ngx/patches/@geoman-io+leaflet-geoman-free+2.11.4.patch
Normal file
File diff suppressed because one or more lines are too long
@ -20,7 +20,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<version>3.3.3-SNAPSHOT</version>
|
<version>3.3.4-SNAPSHOT</version>
|
||||||
<artifactId>thingsboard</artifactId>
|
<artifactId>thingsboard</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
|
|||||||
@ -213,7 +213,7 @@ export class ResourcesService {
|
|||||||
case 'js':
|
case 'js':
|
||||||
el = this.document.createElement('script');
|
el = this.document.createElement('script');
|
||||||
el.type = 'text/javascript';
|
el.type = 'text/javascript';
|
||||||
el.async = true;
|
el.async = false;
|
||||||
el.src = url;
|
el.src = url;
|
||||||
break;
|
break;
|
||||||
case 'css':
|
case 'css':
|
||||||
|
|||||||
@ -400,6 +400,40 @@ export default abstract class LeafletMap {
|
|||||||
this.updatePending = false;
|
this.updatePending = false;
|
||||||
this.updateData(this.drawRoutes, this.showPolygon);
|
this.updateData(this.drawRoutes, this.showPolygon);
|
||||||
}
|
}
|
||||||
|
this.createdControlButtonTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
|
private createdControlButtonTooltip() {
|
||||||
|
import('tooltipster').then(() => {
|
||||||
|
$(this.ctx.$container)
|
||||||
|
.find('a[role="button"]:not(.leaflet-pm-action)')
|
||||||
|
.each((index, element) => {
|
||||||
|
let title;
|
||||||
|
if (element.children.length) {
|
||||||
|
title = (element.children[0] as HTMLElement).title;
|
||||||
|
$(element).children().removeAttr('title');
|
||||||
|
} else {
|
||||||
|
title = element.title;
|
||||||
|
$(element).removeAttr('title');
|
||||||
|
}
|
||||||
|
$(element).tooltipster(
|
||||||
|
{
|
||||||
|
content: title,
|
||||||
|
theme: 'tooltipster-shadow',
|
||||||
|
delay: 10,
|
||||||
|
triggerClose: {
|
||||||
|
click: true,
|
||||||
|
tap: true,
|
||||||
|
scroll: true,
|
||||||
|
mouseleave: true
|
||||||
|
},
|
||||||
|
side: 'right',
|
||||||
|
distance: 2,
|
||||||
|
trackOrigin: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
createLatLng(lat: number, lng: number): L.LatLng {
|
createLatLng(lat: number, lng: number): L.LatLng {
|
||||||
@ -545,7 +579,10 @@ export default abstract class LeafletMap {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.map.pm.Toolbar.setButtonDisabled('tbMarker', !foundEntityWithoutLocation);
|
// @ts-ignore
|
||||||
|
if (this.map.pm.Toolbar.getButtons().tbMarker.disable !== foundEntityWithoutLocation) {
|
||||||
|
this.map.pm.Toolbar.setButtonDisabled('tbMarker', !foundEntityWithoutLocation);
|
||||||
|
}
|
||||||
this.datasources = formattedData;
|
this.datasources = formattedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,8 +598,11 @@ export default abstract class LeafletMap {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.map.pm.Toolbar.setButtonDisabled('tbPolygon', !foundEntityWithoutPolygon);
|
// @ts-ignore
|
||||||
this.map.pm.Toolbar.setButtonDisabled('tbRectangle', !foundEntityWithoutPolygon);
|
if (this.map.pm.Toolbar.getButtons().tbPolygon.disable !== foundEntityWithoutPolygon) {
|
||||||
|
this.map.pm.Toolbar.setButtonDisabled('tbPolygon', !foundEntityWithoutPolygon);
|
||||||
|
this.map.pm.Toolbar.setButtonDisabled('tbRectangle', !foundEntityWithoutPolygon);
|
||||||
|
}
|
||||||
this.datasources = formattedData;
|
this.datasources = formattedData;
|
||||||
}
|
}
|
||||||
if (!this.options.hideRemoveControlButton && !this.options.hideAllControlButton) {
|
if (!this.options.hideRemoveControlButton && !this.options.hideAllControlButton) {
|
||||||
@ -574,23 +614,15 @@ export default abstract class LeafletMap {
|
|||||||
}
|
}
|
||||||
if (!this.options.hideEditControlButton && !this.options.hideAllControlButton) {
|
if (!this.options.hideEditControlButton && !this.options.hideAllControlButton) {
|
||||||
const disabledButton = !foundEntityWithLocation && !foundEntityWithPolygon;
|
const disabledButton = !foundEntityWithLocation && !foundEntityWithPolygon;
|
||||||
if (disabledButton) {
|
// @ts-ignore
|
||||||
|
if (this.map.pm.Toolbar.getButtons().dragMode.disable !== disabledButton) {
|
||||||
|
this.map.pm.Toolbar.setButtonDisabled('dragMode', disabledButton);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.map.pm.Toolbar.toggleButton('dragMode', false);
|
if (this.editPolygons && this.map.pm.Toolbar.getButtons().editMode.disable !== foundEntityWithPolygon) {
|
||||||
}
|
this.map.pm.Toolbar.setButtonDisabled('editMode', !foundEntityWithPolygon);
|
||||||
if (this.editPolygons && !foundEntityWithPolygon) {
|
this.map.pm.Toolbar.setButtonDisabled('cutPolygon', !foundEntityWithPolygon);
|
||||||
// @ts-ignore
|
this.map.pm.Toolbar.setButtonDisabled('rotateMode', !foundEntityWithPolygon);
|
||||||
this.map.pm.Toolbar.toggleButton('editMode', false);
|
}
|
||||||
// @ts-ignore
|
|
||||||
this.map.pm.Toolbar.toggleButton('cutPolygon', false);
|
|
||||||
// @ts-ignore
|
|
||||||
this.map.pm.Toolbar.toggleButton('rotateMode', false);
|
|
||||||
}
|
|
||||||
this.map.pm.Toolbar.setButtonDisabled('dragMode', disabledButton);
|
|
||||||
if (this.editPolygons) {
|
|
||||||
this.map.pm.Toolbar.setButtonDisabled('editMode', !foundEntityWithPolygon);
|
|
||||||
this.map.pm.Toolbar.setButtonDisabled('cutPolygon', !foundEntityWithPolygon);
|
|
||||||
this.map.pm.Toolbar.setButtonDisabled('rotateMode', !foundEntityWithPolygon);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -309,6 +309,12 @@ export class MapWidgetController implements MapWidgetInterface {
|
|||||||
if (this.map) {
|
if (this.map) {
|
||||||
this.map.remove();
|
this.map.remove();
|
||||||
}
|
}
|
||||||
|
if ($.tooltipster) {
|
||||||
|
const instances = $.tooltipster.instances();
|
||||||
|
instances.forEach((instance) => {
|
||||||
|
instance.destroy();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,3 @@
|
|||||||
.leaflet-container {
|
.leaflet-container {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-buttons-control-button.pm-disabled {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -30,6 +30,9 @@ import { isDefined, isDefinedAndNotNull } from '@core/utils';
|
|||||||
import LeafletMap from './leaflet-map';
|
import LeafletMap from './leaflet-map';
|
||||||
|
|
||||||
export class Marker {
|
export class Marker {
|
||||||
|
|
||||||
|
private editing = false;
|
||||||
|
|
||||||
leafletMarker: L.Marker;
|
leafletMarker: L.Marker;
|
||||||
labelOffset: L.LatLngTuple;
|
labelOffset: L.LatLngTuple;
|
||||||
tooltipOffset: L.LatLngTuple;
|
tooltipOffset: L.LatLngTuple;
|
||||||
@ -77,11 +80,13 @@ export class Marker {
|
|||||||
this.leafletMarker.on('pm:dragstart', (e) => {
|
this.leafletMarker.on('pm:dragstart', (e) => {
|
||||||
(this.leafletMarker.dragging as any)._draggable = { _moved: true };
|
(this.leafletMarker.dragging as any)._draggable = { _moved: true };
|
||||||
(this.leafletMarker.dragging as any)._enabled = true;
|
(this.leafletMarker.dragging as any)._enabled = true;
|
||||||
|
this.editing = true;
|
||||||
});
|
});
|
||||||
this.leafletMarker.on('pm:dragend', (e) => {
|
this.leafletMarker.on('pm:dragend', (e) => {
|
||||||
onDragendListener(e, this.data);
|
onDragendListener(e, this.data);
|
||||||
delete (this.leafletMarker.dragging as any)._draggable;
|
delete (this.leafletMarker.dragging as any)._draggable;
|
||||||
delete (this.leafletMarker.dragging as any)._enabled;
|
delete (this.leafletMarker.dragging as any)._enabled;
|
||||||
|
this.editing = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +110,7 @@ export class Marker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateMarkerPosition(position: L.LatLng) {
|
updateMarkerPosition(position: L.LatLng) {
|
||||||
if (!this.leafletMarker.getLatLng().equals(position)) {
|
if (!this.leafletMarker.getLatLng().equals(position) && !this.editing) {
|
||||||
this.location = position;
|
this.location = position;
|
||||||
this.leafletMarker.setLatLng(position);
|
this.leafletMarker.setLatLng(position);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,8 @@ import { FormattedData, PolygonSettings, UnitedMapSettings } from './map-models'
|
|||||||
|
|
||||||
export class Polygon {
|
export class Polygon {
|
||||||
|
|
||||||
|
private editing = false;
|
||||||
|
|
||||||
leafletPoly: L.Polygon;
|
leafletPoly: L.Polygon;
|
||||||
tooltip: L.Popup;
|
tooltip: L.Popup;
|
||||||
data: FormattedData;
|
data: FormattedData;
|
||||||
@ -62,6 +64,8 @@ export class Polygon {
|
|||||||
|
|
||||||
private createEventListeners() {
|
private createEventListeners() {
|
||||||
if (this.settings.editablePolygon && this.onDragendListener) {
|
if (this.settings.editablePolygon && this.onDragendListener) {
|
||||||
|
this.leafletPoly.on('pm:markerdragstart', () => this.editing = true);
|
||||||
|
this.leafletPoly.on('pm:markerdragend', () => this.editing = false);
|
||||||
this.leafletPoly.on('pm:edit', (e) => this.onDragendListener(e, this.data));
|
this.leafletPoly.on('pm:edit', (e) => this.onDragendListener(e, this.data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,6 +104,9 @@ export class Polygon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updatePolygon(data: FormattedData, dataSources: FormattedData[], settings: PolygonSettings) {
|
updatePolygon(data: FormattedData, dataSources: FormattedData[], settings: PolygonSettings) {
|
||||||
|
if (this.editing) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.dataSources = dataSources;
|
this.dataSources = dataSources;
|
||||||
const polyData = data[this.settings.polygonKeyName];
|
const polyData = data[this.settings.polygonKeyName];
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="tb-switch" fxLayout="column" [ngStyle]="{'pointerEvents': ctx.isEdit ? 'none' : 'all'}">
|
<div class="tb-switch" fxLayout="column" [ngStyle]="{'pointerEvents': ctx.isEdit ? 'none' : 'all'}" *ngIf="switchType === 'switch'; else slideToggle">
|
||||||
<div #switchErrorContainer class="error-container" [ngStyle]="{'background': error?.length ? 'rgba(255,255,255,0.25)' : 'none'}"
|
<div #switchErrorContainer class="error-container" [ngStyle]="{'background': error?.length ? 'rgba(255,255,255,0.25)' : 'none'}"
|
||||||
fxLayout="row" fxLayoutAlign="center center">
|
fxLayout="row" fxLayoutAlign="center center">
|
||||||
<span #switchError class="switch-error">{{ error }}</span>
|
<span #switchError class="switch-error">{{ error }}</span>
|
||||||
@ -37,3 +37,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div #textMeasure id="text-measure"></div>
|
<div #textMeasure id="text-measure"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<ng-template #slideToggle>
|
||||||
|
<div class="tb-absolute-fill" fxLayout="column" [ngStyle]="{'pointerEvents': ctx.isEdit ? 'none' : 'all'}" fxLayoutAlign="center center">
|
||||||
|
<div>
|
||||||
|
<mat-slide-toggle [disabled]="executingUpdateValue" [labelPosition]="labelPosition" [color]="sliderColor" [(ngModel)]="value" (change)="onValue()">{{title}}</mat-slide-toggle>
|
||||||
|
<mat-progress-bar style="height: 2px;" [color]="sliderColor" mode="indeterminate" *ngIf="executingUpdateValue"></mat-progress-bar>
|
||||||
|
<div style="height: 2px;" *ngIf="!executingUpdateValue"></div>
|
||||||
|
<tb-error style="margin-top: -6px; display: block; pointer-events: none;"
|
||||||
|
[error]="error"></tb-error>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||||
import { PageComponent } from '@shared/components/page.component';
|
import { PageComponent } from '@shared/components/page.component';
|
||||||
import { WidgetContext } from '@home/models/widget-component.models';
|
import { WidgetContext } from '@home/models/widget-component.models';
|
||||||
import { UtilsService } from '@core/services/utils.service';
|
import { UtilsService } from '@core/services/utils.service';
|
||||||
@ -26,11 +26,14 @@ import { DatasourceType, widgetType } from '@shared/models/widget.models';
|
|||||||
import { EntityType } from '@shared/models/entity-type.models';
|
import { EntityType } from '@shared/models/entity-type.models';
|
||||||
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
||||||
import { ResizeObserver } from '@juggle/resize-observer';
|
import { ResizeObserver } from '@juggle/resize-observer';
|
||||||
|
import { ThemePalette } from '@angular/material/core/common-behaviors/color';
|
||||||
|
|
||||||
const switchAspectRation = 2.7893;
|
const switchAspectRation = 2.7893;
|
||||||
|
|
||||||
type RetrieveValueMethod = 'rpc' | 'attribute' | 'timeseries';
|
type RetrieveValueMethod = 'rpc' | 'attribute' | 'timeseries';
|
||||||
|
|
||||||
|
type SwitchType = 'switch' | 'slide-toggle';
|
||||||
|
|
||||||
interface SwitchSettings {
|
interface SwitchSettings {
|
||||||
initialValue: boolean;
|
initialValue: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
@ -44,6 +47,8 @@ interface SwitchSettings {
|
|||||||
requestTimeout: number;
|
requestTimeout: number;
|
||||||
requestPersistent: boolean;
|
requestPersistent: boolean;
|
||||||
persistentPollingInterval: number;
|
persistentPollingInterval: number;
|
||||||
|
labelPosition: 'before' | 'after';
|
||||||
|
sliderColor: ThemePalette;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -51,28 +56,33 @@ interface SwitchSettings {
|
|||||||
templateUrl: './switch.component.html',
|
templateUrl: './switch.component.html',
|
||||||
styleUrls: ['./switch.component.scss']
|
styleUrls: ['./switch.component.scss']
|
||||||
})
|
})
|
||||||
export class SwitchComponent extends PageComponent implements OnInit, OnDestroy {
|
export class SwitchComponent extends PageComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
|
|
||||||
@ViewChild('switch', {static: true}) switchElementRef: ElementRef<HTMLElement>;
|
@ViewChild('switch', {static: false}) switchElementRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('switchContainer', {static: true}) switchContainerRef: ElementRef<HTMLElement>;
|
@ViewChild('switchContainer', {static: false}) switchContainerRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('matSlideToggle', {static: true}) matSlideToggleRef: MatSlideToggle;
|
@ViewChild('matSlideToggle', {static: false}) matSlideToggleRef: MatSlideToggle;
|
||||||
@ViewChild('onoffContainer', {static: true}) onoffContainerRef: ElementRef<HTMLElement>;
|
@ViewChild('onoffContainer', {static: false}) onoffContainerRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('onLabel', {static: true}) onLabelRef: ElementRef<HTMLElement>;
|
@ViewChild('onLabel', {static: false}) onLabelRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('offLabel', {static: true}) offLabelRef: ElementRef<HTMLElement>;
|
@ViewChild('offLabel', {static: false}) offLabelRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('switchTitleContainer', {static: true}) switchTitleContainerRef: ElementRef<HTMLElement>;
|
@ViewChild('switchTitleContainer', {static: false}) switchTitleContainerRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('switchTitle', {static: true}) switchTitleRef: ElementRef<HTMLElement>;
|
@ViewChild('switchTitle', {static: false}) switchTitleRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('textMeasure', {static: true}) textMeasureRef: ElementRef<HTMLElement>;
|
@ViewChild('textMeasure', {static: false}) textMeasureRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('switchErrorContainer', {static: true}) switchErrorContainerRef: ElementRef<HTMLElement>;
|
@ViewChild('switchErrorContainer', {static: false}) switchErrorContainerRef: ElementRef<HTMLElement>;
|
||||||
@ViewChild('switchError', {static: true}) switchErrorRef: ElementRef<HTMLElement>;
|
@ViewChild('switchError', {static: false}) switchErrorRef: ElementRef<HTMLElement>;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
ctx: WidgetContext;
|
ctx: WidgetContext;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
switchType: SwitchType = 'switch';
|
||||||
|
|
||||||
showTitle = false;
|
showTitle = false;
|
||||||
value = false;
|
value = false;
|
||||||
error = '';
|
error = '';
|
||||||
title = '';
|
title = '';
|
||||||
showOnOffLabels = false;
|
showOnOffLabels = false;
|
||||||
|
labelPosition: 'before' | 'after' = 'after';
|
||||||
|
sliderColor: ThemePalette = 'accent';
|
||||||
|
|
||||||
private isSimulated: boolean;
|
private isSimulated: boolean;
|
||||||
private requestTimeout: number;
|
private requestTimeout: number;
|
||||||
@ -87,7 +97,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
|
|
||||||
private valueSubscription: IWidgetSubscription;
|
private valueSubscription: IWidgetSubscription;
|
||||||
|
|
||||||
private executingUpdateValue: boolean;
|
public executingUpdateValue: boolean;
|
||||||
private scheduledValue: boolean;
|
private scheduledValue: boolean;
|
||||||
private rpcValue: boolean;
|
private rpcValue: boolean;
|
||||||
|
|
||||||
@ -111,22 +121,27 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.switchElement = $(this.switchElementRef.nativeElement);
|
}
|
||||||
this.switchContainer = $(this.switchContainerRef.nativeElement);
|
|
||||||
this.matSlideToggle = $(this.matSlideToggleRef._elementRef.nativeElement);
|
|
||||||
this.onoffContainer = $(this.onoffContainerRef.nativeElement);
|
|
||||||
this.onLabel = $(this.onLabelRef.nativeElement);
|
|
||||||
this.offLabel = $(this.offLabelRef.nativeElement);
|
|
||||||
this.switchTitleContainer = $(this.switchTitleContainerRef.nativeElement);
|
|
||||||
this.switchTitle = $(this.switchTitleRef.nativeElement);
|
|
||||||
this.textMeasure = $(this.textMeasureRef.nativeElement);
|
|
||||||
this.switchErrorContainer = $(this.switchErrorContainerRef.nativeElement);
|
|
||||||
this.switchError = $(this.switchErrorRef.nativeElement);
|
|
||||||
|
|
||||||
this.switchResize$ = new ResizeObserver(() => {
|
ngAfterViewInit() {
|
||||||
this.resize();
|
if (this.switchType === 'switch') {
|
||||||
});
|
this.switchElement = $(this.switchElementRef.nativeElement);
|
||||||
this.switchResize$.observe(this.switchContainerRef.nativeElement);
|
this.switchContainer = $(this.switchContainerRef.nativeElement);
|
||||||
|
this.matSlideToggle = $(this.matSlideToggleRef._elementRef.nativeElement);
|
||||||
|
this.onoffContainer = $(this.onoffContainerRef.nativeElement);
|
||||||
|
this.onLabel = $(this.onLabelRef.nativeElement);
|
||||||
|
this.offLabel = $(this.offLabelRef.nativeElement);
|
||||||
|
this.switchTitleContainer = $(this.switchTitleContainerRef.nativeElement);
|
||||||
|
this.switchTitle = $(this.switchTitleRef.nativeElement);
|
||||||
|
this.textMeasure = $(this.textMeasureRef.nativeElement);
|
||||||
|
this.switchErrorContainer = $(this.switchErrorContainerRef.nativeElement);
|
||||||
|
this.switchError = $(this.switchErrorRef.nativeElement);
|
||||||
|
|
||||||
|
this.switchResize$ = new ResizeObserver(() => {
|
||||||
|
this.resize();
|
||||||
|
});
|
||||||
|
this.switchResize$.observe(this.switchContainerRef.nativeElement);
|
||||||
|
}
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,6 +160,8 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
this.title = isDefined(settings.title) ? settings.title : '';
|
this.title = isDefined(settings.title) ? settings.title : '';
|
||||||
this.showTitle = !!(this.title && this.title.length);
|
this.showTitle = !!(this.title && this.title.length);
|
||||||
this.showOnOffLabels = isDefined(settings.showOnOffLabels) ? settings.showOnOffLabels : true;
|
this.showOnOffLabels = isDefined(settings.showOnOffLabels) ? settings.showOnOffLabels : true;
|
||||||
|
this.labelPosition = isDefined(settings.labelPosition) ? settings.labelPosition : 'after';
|
||||||
|
this.sliderColor = isDefined(settings.sliderColor) ? settings.sliderColor : 'accent';
|
||||||
const initialValue = isDefined(settings.initialValue) ? settings.initialValue : false;
|
const initialValue = isDefined(settings.initialValue) ? settings.initialValue : false;
|
||||||
this.setValue(initialValue);
|
this.setValue(initialValue);
|
||||||
|
|
||||||
@ -256,7 +273,9 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
|
|
||||||
private onError(error: string) {
|
private onError(error: string) {
|
||||||
this.error = error;
|
this.error = error;
|
||||||
this.setFontSize(this.switchError, this.error, this.switchErrorContainer.height(), this.switchErrorContainer.width());
|
if (this.switchType === 'switch') {
|
||||||
|
this.setFontSize(this.switchError, this.error, this.switchErrorContainer.height(), this.switchErrorContainer.width());
|
||||||
|
}
|
||||||
this.ctx.detectChanges();
|
this.ctx.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,6 +297,10 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
const errorText = this.ctx.defaultSubscription.rpcErrorText;
|
const errorText = this.ctx.defaultSubscription.rpcErrorText;
|
||||||
|
if (this.switchType === 'slide-toggle') {
|
||||||
|
this.ctx.defaultSubscription.rpcErrorText = null;
|
||||||
|
this.ctx.hideToast(this.ctx.toastTargetId);
|
||||||
|
}
|
||||||
this.onError(errorText);
|
this.onError(errorText);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -304,6 +327,10 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
|||||||
() => {
|
() => {
|
||||||
this.executingUpdateValue = false;
|
this.executingUpdateValue = false;
|
||||||
const errorText = this.ctx.defaultSubscription.rpcErrorText;
|
const errorText = this.ctx.defaultSubscription.rpcErrorText;
|
||||||
|
if (this.switchType === 'slide-toggle') {
|
||||||
|
this.ctx.defaultSubscription.rpcErrorText = null;
|
||||||
|
this.ctx.hideToast(this.ctx.toastTargetId);
|
||||||
|
}
|
||||||
this.onError(errorText);
|
this.onError(errorText);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@ -922,7 +922,7 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
|
|||||||
} else if (this.modelValue) {
|
} else if (this.modelValue) {
|
||||||
const config = this.modelValue.config;
|
const config = this.modelValue.config;
|
||||||
if (this.widgetType === widgetType.rpc && this.modelValue.isDataEnabled) {
|
if (this.widgetType === widgetType.rpc && this.modelValue.isDataEnabled) {
|
||||||
if (!config.targetDeviceAliasIds || !config.targetDeviceAliasIds.length) {
|
if (!this.widgetEditMode && (!config.targetDeviceAliasIds || !config.targetDeviceAliasIds.length)) {
|
||||||
return {
|
return {
|
||||||
targetDeviceAliasIds: {
|
targetDeviceAliasIds: {
|
||||||
valid: false
|
valid: false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user