Merge branch 'develop/3.0' of github.com:thingsboard/thingsboard into develop/3.0
This commit is contained in:
commit
416432e3ed
@ -220,6 +220,11 @@
|
|||||||
<artifactId>tools</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.thingsboard</groupId>
|
||||||
|
<artifactId>rest-client</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
|||||||
@ -221,10 +221,6 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
conn.createStatement().execute("ALTER TABLE dashboard ALTER COLUMN configuration SET DATA TYPE varchar(100000000);"); //NOSONAR, ignoring because method used to execute thingsboard database upgrade script
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
log.info("Schema updated.");
|
log.info("Schema updated.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -85,10 +85,10 @@ public class PsqlInsertTsRepository extends AbstractInsertRepository implements
|
|||||||
} else {
|
} else {
|
||||||
ps.setNull(7, Types.DOUBLE);
|
ps.setNull(7, Types.DOUBLE);
|
||||||
ps.setNull(12, Types.DOUBLE);
|
ps.setNull(12, Types.DOUBLE);
|
||||||
|
|
||||||
ps.setString(8, replaceNullChars(tsKvEntity.getJsonValue()));
|
|
||||||
ps.setString(13, replaceNullChars(tsKvEntity.getJsonValue()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ps.setString(8, replaceNullChars(tsKvEntity.getJsonValue()));
|
||||||
|
ps.setString(13, replaceNullChars(tsKvEntity.getJsonValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -108,7 +108,7 @@ CREATE TABLE IF NOT EXISTS customer (
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS dashboard (
|
CREATE TABLE IF NOT EXISTS dashboard (
|
||||||
id varchar(31) NOT NULL CONSTRAINT dashboard_pkey PRIMARY KEY,
|
id varchar(31) NOT NULL CONSTRAINT dashboard_pkey PRIMARY KEY,
|
||||||
configuration varchar(100000000),
|
configuration varchar(10000000),
|
||||||
assigned_customers varchar(1000000),
|
assigned_customers varchar(1000000),
|
||||||
search_text varchar(255),
|
search_text varchar(255),
|
||||||
tenant_id varchar(31),
|
tenant_id varchar(31),
|
||||||
|
|||||||
@ -90,6 +90,10 @@
|
|||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<artifactId>tools</artifactId>
|
<artifactId>tools</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.thingsboard</groupId>
|
||||||
|
<artifactId>rest-client</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -38,7 +38,7 @@ import org.junit.rules.TestRule;
|
|||||||
import org.junit.rules.TestWatcher;
|
import org.junit.rules.TestWatcher;
|
||||||
import org.junit.runner.Description;
|
import org.junit.runner.Description;
|
||||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||||
import org.thingsboard.client.tools.RestClient;
|
import org.thingsboard.rest.client.RestClient;
|
||||||
import org.thingsboard.server.common.data.Device;
|
import org.thingsboard.server.common.data.Device;
|
||||||
import org.thingsboard.server.common.data.EntityType;
|
import org.thingsboard.server.common.data.EntityType;
|
||||||
import org.thingsboard.server.common.data.id.DeviceId;
|
import org.thingsboard.server.common.data.id.DeviceId;
|
||||||
|
|||||||
7
pom.xml
7
pom.xml
@ -106,6 +106,7 @@
|
|||||||
<module>tools</module>
|
<module>tools</module>
|
||||||
<module>application</module>
|
<module>application</module>
|
||||||
<module>msa</module>
|
<module>msa</module>
|
||||||
|
<module>rest-client</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
@ -432,6 +433,12 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.thingsboard</groupId>
|
||||||
|
<artifactId>rest-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.thingsboard</groupId>
|
<groupId>org.thingsboard</groupId>
|
||||||
<artifactId>dao</artifactId>
|
<artifactId>dao</artifactId>
|
||||||
|
|||||||
48
rest-client/pom.xml
Normal file
48
rest-client/pom.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.thingsboard</groupId>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
<artifactId>thingsboard</artifactId>
|
||||||
|
</parent>
|
||||||
|
<artifactId>rest-client</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Thingsboard Rest Client</name>
|
||||||
|
<url>https://thingsboard.io</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<main.dir>${basedir}/..</main.dir>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.thingsboard.common</groupId>
|
||||||
|
<artifactId>data</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.thingsboard.client.tools;
|
package org.thingsboard.rest.client;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@ -31,7 +31,7 @@ import org.springframework.http.client.support.HttpRequestWrapper;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.client.HttpClientErrorException;
|
import org.springframework.web.client.HttpClientErrorException;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
import org.thingsboard.client.tools.utils.RestJsonConverter;
|
import org.thingsboard.rest.client.utils.RestJsonConverter;
|
||||||
import org.thingsboard.server.common.data.AdminSettings;
|
import org.thingsboard.server.common.data.AdminSettings;
|
||||||
import org.thingsboard.server.common.data.ClaimRequest;
|
import org.thingsboard.server.common.data.ClaimRequest;
|
||||||
import org.thingsboard.server.common.data.Customer;
|
import org.thingsboard.server.common.data.Customer;
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.thingsboard.client.tools.utils;
|
package org.thingsboard.rest.client.utils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
Loading…
x
Reference in New Issue
Block a user